Merge pull request #221 from Li-Xiang-Ideal/patch-1 #93
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: cairocffi'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' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: xvfb daemon (Ubuntu) | |
if: matrix.os == 'ubuntu-latest' | |
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 | |
- name: Pip installs (Ubuntu) | |
if: matrix.os == 'ubuntu-latest' | |
run: python -m pip install -e .[xcb] | |
- name: Install cairo gdk-pixbuf (MacOS) | |
if: matrix.os == 'macos-latest' | |
run: | | |
brew update | |
brew pin numpy gdal postgis | |
brew install cairo gdk-pixbuf | |
- name: Install msys2 and DejaVu (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-gtk3 --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: Install tests’ requirements | |
run: python -m pip install -e .[test] | |
- name: Launch tests | |
run: python -m pytest | |
- name: Check coding style | |
run: python -m flake8 | |
- name: Check imports order | |
run: python -m isort . --check --diff |