2025-02-08 07:40:28 +01:00
|
|
|
|
name: pydyf'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]
|
2025-02-08 07:48:59 +01:00
|
|
|
|
python-version: ['3.11']
|
|
|
|
|
include:
|
|
|
|
|
- os: ubuntu-latest
|
|
|
|
|
python-version: '3.7'
|
|
|
|
|
- os: ubuntu-latest
|
|
|
|
|
python-version: 'pypy-3.8'
|
2025-02-08 07:40:28 +01:00
|
|
|
|
steps:
|
2025-02-08 07:48:59 +01:00
|
|
|
|
- uses: actions/checkout@v3
|
2025-02-08 07:40:28 +01:00
|
|
|
|
- uses: actions/setup-python@v2
|
|
|
|
|
with:
|
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
|
- name: Install Ghostscript (Ubuntu)
|
|
|
|
|
if: matrix.os == 'ubuntu-latest'
|
|
|
|
|
run: sudo apt-get update -y && sudo apt-get install ghostscript -y
|
|
|
|
|
- name: Install Ghostscript (macOS)
|
|
|
|
|
if: matrix.os == 'macos-latest'
|
|
|
|
|
run: brew install ghostscript
|
|
|
|
|
- name: Install Ghostscript (Windows)
|
|
|
|
|
if: matrix.os == 'windows-latest'
|
|
|
|
|
run: |
|
|
|
|
|
C:\msys64\usr\bin\bash -lc 'pacman -S mingw-w64-x86_64-ghostscript --noconfirm'
|
|
|
|
|
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]
|
|
|
|
|
- name: Launch tests
|
|
|
|
|
run: python -m pytest
|
2025-02-08 07:42:18 +01:00
|
|
|
|
- name: Check coding style
|
|
|
|
|
run: python -m flake8
|
|
|
|
|
- name: Check imports order
|
|
|
|
|
run: python -m isort . --check --diff
|