| 1 |
name: cairocffi's tests |
| 2 |
on: [push, pull_request] |
| 3 |
|
| 4 |
jobs: |
| 5 |
tests: |
| 6 |
name: ${{ matrix.os }} - ${{ matrix.python-version }} |
| 7 |
runs-on: ${{ matrix.os }} |
| 8 |
strategy: |
| 9 |
matrix: |
| 10 |
os: [ubuntu-latest, macos-latest, windows-latest] |
| 11 |
python-version: ['3.12'] |
| 12 |
include: |
| 13 |
- os: ubuntu-latest |
| 14 |
python-version: '3.8' |
| 15 |
steps: |
| 16 |
- uses: actions/checkout@v4 |
| 17 |
- uses: actions/setup-python@v5 |
| 18 |
with: |
| 19 |
python-version: ${{ matrix.python-version }} |
| 20 |
- name: Start xvfb daemon (Ubuntu) |
| 21 |
if: matrix.os == 'ubuntu-latest' |
| 22 |
run: sudo /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16 |
| 23 |
- name: Installs XCB support (Ubuntu) |
| 24 |
if: matrix.os == 'ubuntu-latest' |
| 25 |
run: python -m pip install -e .[xcb] |
| 26 |
- name: Install Cairo and GdkPixbuf (MacOS) |
| 27 |
if: matrix.os == 'macos-latest' |
| 28 |
run: brew install cairo gdk-pixbuf |
| 29 |
- name: Install Gtk and DejaVu fonts (Windows) |
| 30 |
if: matrix.os == 'windows-latest' |
| 31 |
run: | |
| 32 |
C:\msys64\usr\bin\bash -lc 'pacman -S mingw-w64-x86_64-ttf-dejavu mingw-w64-x86_64-gtk3 --noconfirm' |
| 33 |
xcopy "C:\msys64\mingw64\share\fonts\TTF" "C:\Users\runneradmin\.fonts" /e /i |
| 34 |
echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH |
| 35 |
rm C:\msys64\mingw64\bin\python.exe |
| 36 |
- name: Install tests’ requirements |
| 37 |
run: python -m pip install -e .[test] |
| 38 |
- name: Launch tests |
| 39 |
run: python -m pytest |
| 40 |
env: |
| 41 |
DYLD_FALLBACK_LIBRARY_PATH: /opt/homebrew/lib |
| 42 |
- name: Check coding style |
| 43 |
run: python -m ruff check |