Skip to content

Forms accessibility #624

Forms accessibility

Forms accessibility #624

Workflow file for this run

name: WeasyPrint's PDF/UA tests
on: [push, pull_request]
env:
PDF_FOLDER: 'pdfs'
VERA_FOLDER: 'vera'
jobs:
pdf-ua:
name: Test PDF/UA samples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install requirements
run: python -m pip install .
- name: Create output folders
run: |
mkdir ${{env.PDF_FOLDER}}
mkdir ${{env.VERA_FOLDER}}
- name: Clone samples repository
run: git clone https://github.com/CourtBouillon/weasyprint-samples.git
- name: Generate samples
run: |
python -m weasyprint --pdf-variant pdf/ua-1 weasyprint-samples/book/book.html -s weasyprint-samples/book/book-classical.css ${{env.PDF_FOLDER}}/book-classical.pdf
python -m weasyprint --pdf-variant pdf/ua-1 weasyprint-samples/book/book.html -s weasyprint-samples/book/book.css ${{env.PDF_FOLDER}}/book-fancy.pdf
python -m weasyprint --pdf-variant pdf/ua-1 weasyprint-samples/letter/letter.html ${{env.PDF_FOLDER}}/letter.pdf
python -m weasyprint --pdf-variant pdf/ua-1 weasyprint-samples/report/report.html ${{env.PDF_FOLDER}}/report.pdf
- name: Install VeraPDF
run: |
wget https://software.verapdf.org/releases/verapdf-installer.zip
unzip verapdf-installer.zip
java -DINSTALL_PATH=/tmp -jar verapdf-greenfield-*/verapdf-izpack-installer-*.jar -options-system
- name: Generate VeraPDF reports
run: |
/tmp/verapdf -f ua1 --format html ${{env.PDF_FOLDER}}/book-classical.pdf > ${{env.VERA_FOLDER}}/book-classical-verapdf.html
/tmp/verapdf -f ua1 --format html ${{env.PDF_FOLDER}}/book-fancy.pdf > ${{env.VERA_FOLDER}}/book-fancy-verapdf.html
/tmp/verapdf -f ua1 --format html ${{env.PDF_FOLDER}}/letter.pdf > ${{env.VERA_FOLDER}}/letter-verapdf.html
/tmp/verapdf -f ua1 --format html ${{env.PDF_FOLDER}}/report.pdf > ${{env.VERA_FOLDER}}/report-verapdf.html
/tmp/verapdf -f ua1 --format html ${{env.PDF_FOLDER}}/ > ${{env.VERA_FOLDER}}/summary.html
- name: Archive generated PDFs
if: ${{ always() }}
uses: actions/upload-artifact@v7
with:
name: vera-results
path: |
${{env.VERA_FOLDER}}
${{env.PDF_FOLDER}}
retention-days: 1