name: WeasyPrint's samples tests
on: [push, pull_request]

jobs:
  tests:
    name: ${{ matrix.os }} - ${{ matrix.python-version }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: ubuntu-latest
        python-version: '3.10'
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}
      - name: Install DejaVu and Ghostscript (Ubuntu)
        if: matrix.os == 'ubuntu-latest'
        run: sudo apt-get update -y && sudo apt-get install git -y
      - name: Upgrade pip and setuptools
        run: python -m pip install --upgrade pip setuptools
      - name: Install requirements
        run: python -m pip install .
      - name: Clone samples repository
        run: git clone https://github.com/CourtBouillon/weasyprint-samples.git
      - name: Book classical
        run: python -m weasyprint weasyprint-samples/book/book.html -s weasyprint-samples/book/book-classical.css book-classical.pdf
      - name: Book fancy
        run: python -m weasyprint weasyprint-samples/book/book.html -s weasyprint-samples/book/book.css book-fancy.pdf
      - name: Invoice
        run: python -m weasyprint weasyprint-samples/invoice/invoice.html invoice.pdf
      - name: Letter
        run: python -m weasyprint weasyprint-samples/letter/letter.html letter.pdf
      - name: Poster
        run: python -m weasyprint weasyprint-samples/poster/poster.html -s weasyprint-samples/poster/poster.css poster.pdf
      - name: Flyer
        run: python -m weasyprint weasyprint-samples/poster/poster.html -s weasyprint-samples/poster/flyer.css flyer.pdf
      - name: Report
        run: python -m weasyprint weasyprint-samples/report/report.html report.pdf
      - name: Ticket
        run: python -m weasyprint weasyprint-samples/ticket/ticket.html ticket.pdf
	
	
	

Check if samples generation works
Check if samples generation works
