Skip to content

fix: Fix napari 0.5.0 compatybility #3246

fix: Fix napari 0.5.0 compatybility

fix: Fix napari 0.5.0 compatybility #3246

# An "early warning" cron job that will install dependencies
# with `pip install --pre` periodically to test for breakage
# (and open an issue if a test fails)
name: --pre Test
on:
push:
branches:
- master
- develop
schedule:
- cron: '0 */12 * * *' # every 12 hours
pull_request:
paths:
- '.github/workflows/test_prereleases.yml'
- 'pyproject.toml'
- 'requirements/pre_test_problematic_version.txt'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
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:
name: ${{ matrix.platform }} py${{ matrix.python }} ${{ matrix.backend }} --pre
runs-on: ${{ matrix.platform }}
needs: download_data
strategy:
fail-fast: false
matrix:
platform: [windows-2022, macos-12, ubuntu-22.04]
python: [3.9]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pip'
cache-dependency-path: 'pyproject.toml'
- 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}
- uses: tlambert03/setup-qt-libs@v1
- name: Download test data
uses: actions/download-artifact@v4
with:
name: test_data
path: test_data
- name: Install dependencies
run: |
pip install --upgrade pip
pip install setuptools tox tox-gh-actions>=2.12.0
- name: Test with tox linux
# run tests using pip install --pre
uses: aganders3/headless-gui@v2
timeout-minutes: 60
with:
run: python -m tox -v --pre
env:
PLATFORM: ${{ matrix.platform }}
PYVISTA_OFF_SCREEN: True # required for opengl on windows
NAPARI: latest
BACKEND: PyQt5
PIP_CONSTRAINT: requirements/pre_test_problematic_version.txt
# If something goes wrong, we can open an issue in the repo
- 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] pip install --pre is failing'
with:
filename: .github/TEST_FAIL_TEMPLATE.md
update_existing: true
pyinstaller:
name: "Test pyinstaller build"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python 3.9
with:
python-version: 3.9
- uses: tlambert03/setup-qt-libs@v1
- name: Install dependencies
run: |
pip install --upgrade pip
pip install pip-tools
- name: Compile and install PyInstaller requirements
run: |
pip-compile --upgrade -o requirements.txt pyproject.toml requirements/pre_test_problematic_version.txt --extra pyinstaller --pre
pip-sync
pip install .
- name: upload requirements
uses: actions/upload-artifact@v4
with:
name: requirements
path: requirements.txt
- name: Run PyInstaller
run: python build_utils/create_and_pack_executable.py
- name: Upload bundle
uses: actions/upload-artifact@v4
with:
name: bundle
path: dist2/
- name: Test bundle
uses: aganders3/headless-gui@v2
timeout-minutes: 60
with:
run: dist/PartSeg/PartSeg _test
# If something goes wrong, we can open an issue in the repo
- 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] pyinstaller bundle --pre is failing'
with:
filename: .github/TEST_FAIL_TEMPLATE.md
update_existing: true