Fix the CI and expand Python versions #162
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: Run tox tests | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
pytest: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: [[3, 8], [3, 9], [3, 10], [3, 11], [3, 12]] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
exclude: | |
- os: windows-latest | |
python-version: [3, 11] | |
- os: windows-latest | |
python-version: [3, 12] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ join(matrix.python-version, '.') }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ join(matrix.python-version, '.') }} | |
- name: Copy policy file for ubuntu-latest (needed to use ImageMagic in visual debugging tox tests) | |
run: | | |
sudo cp .github/workflows/policy.xml /etc/ImageMagick-6/policy.xml | |
if: matrix.os == 'ubuntu-latest' | |
- name: Install ghostscript | |
run: | | |
sudo apt install ghostscript | |
if: matrix.os == 'ubuntu-latest' | |
- name: Install ImageMagick on macos-latest | |
run: | | |
brew install freetype imagemagick | |
if: matrix.os == 'macos-latest' | |
- name: Install poetry and tox | |
run: | | |
python -m pip install poetry tox | |
- name: Run tox env pytest on Linux, macOS | |
run: | | |
tox -e py${{ join(matrix.python-version, '') }} | |
if: runner.os == 'Linux' || runner.os == 'macOS' | |
# set the shell for Windows so env var expansion works in tox and subprocesses | |
- name: Run tox env pytest on Windows | |
run: | | |
tox -e py${{ join(matrix.python-version, '') }} | |
shell: cmd | |
if: runner.os == 'Windows' | |
docs_black: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.12 | |
- name: Install poetry and tox | |
run: | | |
python -m pip install poetry tox | |
- name: Run tox env docs | |
run: | | |
tox -e docs | |
- name: Run tox env black | |
run: | | |
tox -e black |