Skip to content

Add executable generation for Linux and macOS #522

Add executable generation for Linux and macOS

Add executable generation for Linux and macOS #522

Workflow file for this run

name: WeasyPrint's samples tests
on: [push, pull_request]
env:
REPORTS_FOLDER: 'report'
jobs:
tests:
name: ${{ matrix.os }} - ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.11']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- 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: Create output folder
run: mkdir ${{env.REPORTS_FOLDER}}
- name: Book classical
run: python -m weasyprint weasyprint-samples/book/book.html -s weasyprint-samples/book/book-classical.css ${{env.REPORTS_FOLDER}}/book-classical.pdf
- name: Book fancy
run: python -m weasyprint weasyprint-samples/book/book.html -s weasyprint-samples/book/book.css ${{env.REPORTS_FOLDER}}/book-fancy.pdf
- name: Invoice
run: python -m weasyprint weasyprint-samples/invoice/invoice.html ${{env.REPORTS_FOLDER}}/invoice.pdf
- name: Letter
run: python -m weasyprint weasyprint-samples/letter/letter.html ${{env.REPORTS_FOLDER}}/letter.pdf
- name: Poster
run: python -m weasyprint weasyprint-samples/poster/poster.html -s weasyprint-samples/poster/poster.css ${{env.REPORTS_FOLDER}}/poster.pdf
- name: Flyer
run: python -m weasyprint weasyprint-samples/poster/poster.html -s weasyprint-samples/poster/flyer.css ${{env.REPORTS_FOLDER}}/flyer.pdf
- name: Report
run: python -m weasyprint weasyprint-samples/report/report.html ${{env.REPORTS_FOLDER}}/report.pdf
- name: Ticket
run: python -m weasyprint weasyprint-samples/ticket/ticket.html ${{env.REPORTS_FOLDER}}/ticket.pdf
- name: Archive generated PDFs
uses: actions/upload-artifact@v3
with:
name: generated-documents
path: ${{env.REPORTS_FOLDER}}
retention-days: 1