1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-06 00:47:13 +03:00
WeasyPrint/.github/workflows/tests.yml
2024-05-22 19:41:21 +02:00

48 lines
1.8 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: WeasyPrint's tests
on: [push, pull_request]
jobs:
tests:
name: ${{ matrix.os }} - ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.12']
include:
- os: ubuntu-latest
python-version: '3.9'
- os: ubuntu-latest
python-version: 'pypy-3.9'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
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 fonts-dejavu ghostscript -y
- name: Install DejaVu, Pango and Ghostscript (MacOS)
if: matrix.os == 'macos-latest'
run: |
brew update
brew install --cask font-dejavu
brew install pango ghostscript
- name: Install DejaVu, Pango and Ghostscript (Windows)
if: matrix.os == 'windows-latest'
run: |
C:\msys64\usr\bin\bash -lc 'pacman -S mingw-w64-x86_64-ttf-dejavu mingw-w64-x86_64-pango mingw-w64-x86_64-ghostscript --noconfirm'
xcopy "C:\msys64\mingw64\share\fonts\TTF" "C:\Users\runneradmin\.fonts" /e /i
echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH
rm C:\msys64\mingw64\bin\python.exe
- name: Upgrade pip and setuptools
run: python -m pip install --upgrade pip setuptools
- name: Install tests requirements
run: python -m pip install .[test] pytest-xdist
- name: Launch tests
run: python -m pytest -n auto
env:
DYLD_FALLBACK_LIBRARY_PATH: /opt/homebrew/lib
- name: Check coding style
run: python -m ruff check