-
-
Notifications
You must be signed in to change notification settings - Fork 686
49 lines (48 loc) · 1.88 KB
/
tests.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
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.11']
include:
- os: ubuntu-latest
python-version: '3.7'
- os: ubuntu-latest
python-version: 'pypy-3.8'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
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: |
rm /usr/local/bin/2to3
brew update
brew tap homebrew/cask-fonts
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
- name: Check coding style
run: python -m flake8
- name: Check imports order
run: python -m isort . --check --diff