test-OS-matrix #4
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
# Test with all python versions and on all platforms | |
# Deploy napari-locan, i.e. upload to PyPi when a release is created | |
name: test-matrix | |
on: | |
schedule: | |
- cron: "37 4 * * 2" | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
test: | |
name: ${{ matrix.platform }} py${{ matrix.python-version }} | |
runs-on: ${{ matrix.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ["3.8", "3.9", "3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# these libraries enable testing on Qt on linux | |
- uses: tlambert03/setup-qt-libs@v1 | |
# strategy borrowed from vispy for installing opengl libs on windows | |
- name: Install Windows OpenGL | |
if: runner.os == 'Windows' | |
run: | | |
git clone --depth 1 https://github.com/pyvista/gl-ci-helpers.git | |
powershell gl-ci-helpers/appveyor/install_opengl.ps1 | |
- name: "Install napari-locan and dependencies" | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install .[test] | |
- name: "Run tests" | |
uses: coactions/setup-xvfb@v1 | |
with: | |
run: pytest |