-
-
Notifications
You must be signed in to change notification settings - Fork 684
50 lines (48 loc) · 2.17 KB
/
test_samples.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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