build: require napari>=0.5.0 only for python 3.9+ #406
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: napari repo | |
on: | |
schedule: | |
- cron: '0 10 * * 1,3,5' # every 24 hours | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- '.github/workflows/test_napari_repo.yml' | |
- pyproject.toml | |
- tox.ini | |
jobs: | |
download_data: | |
name: Download test data | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- shell: bash | |
run: bash build_utils/download_data.sh | |
- name: Upload test data | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test_data | |
path: test_data | |
retention-days: 5 | |
test_napari: | |
name: ${{ matrix.napari_version }} py${{ matrix.python }} | |
runs-on: ${{ matrix.platform }} | |
needs: download_data | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ ubuntu-22.04 ] | |
python: ['3.9' , '3.10', '3.11', '3.12'] | |
napari_version: ['repo'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install Windows OpenGL | |
if: runner.os == 'Windows' | |
run: | | |
git clone --depth 1 git://github.com/pyvista/gl-ci-helpers.git | |
powershell gl-ci-helpers/appveyor/install_opengl.ps1 | |
if (Test-Path -Path "C:\Windows\system32\opengl32.dll" -PathType Leaf) {Exit 0} else {Exit 1} | |
shell: powershell | |
- uses: tlambert03/setup-qt-libs@v1 | |
- name: Install dependencies | |
run: | | |
pip install --upgrade pip | |
pip install setuptools tox tox-gh-actions | |
- name: Download test data | |
uses: actions/download-artifact@v4 | |
with: | |
name: test_data | |
path: test_data | |
- name: Test with tox | |
# run tests using pip install --pre | |
uses: aganders3/headless-gui@v2 | |
timeout-minutes: 60 | |
with: | |
run: tox | |
env: | |
PLATFORM: ${{ matrix.platform }} | |
NAPARI: ${{ matrix.napari_version }} | |
PYVISTA_OFF_SCREEN: True # required for opengl on windows | |
- name: Report Failures | |
if: ${{ failure() }} | |
uses: JasonEtco/create-an-issue@v2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PLATFORM: ${{ matrix.platform }} | |
PYTHON: ${{ matrix.python }} | |
RUN_ID: ${{ github.run_id }} | |
TITLE: '[test-bot] napari repos test fail' | |
with: | |
filename: .github/TEST_FAIL_TEMPLATE.md | |
update_existing: true |