Skip to content

--pre Test

--pre Test #1259

# 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:
schedule:
- cron: '0 */12 * * *' # every 12 hours
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/test_prereleases.yml'
- 'resources/constraints/version_denylist.txt'
env:
COLUMNS: 120
jobs:
test:
name: ${{ matrix.platform }} py${{ matrix.python }} ${{ matrix.backend }} --pre
timeout-minutes: 60
runs-on: ${{ matrix.platform }}
permissions:
contents: read
issues: write
if: ${{ github.repository == 'napari/napari' || github.event_name == 'workflow_dispatch' }}
strategy:
fail-fast: false
matrix:
platform: [windows-latest, macos-15, ubuntu-latest]
python: [3.13, 3.14]
backend: [pyqt5, pyqt6, pyside6]
include:
- platform: ubuntu-latest
python: 3.13
backend: pyqt6_no_numba
- platform: ubuntu-24.04-arm
python: 3.14
backend: pyqt6
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python }}
cache-dependency-path: pyproject.toml
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@b1de5da23ed0a6d14e0aeee8ed52fdd87af2363c # v2.0.2
continue-on-error: true
- name: Set Windows resolution
if: runner.os == 'Windows'
run: Set-DisplayResolution -Width 1920 -Height 1080 -Force
shell: powershell
- name: Setup headless display
uses: pyvista/setup-headless-display-action@5bc8de3bc71fcda7a96439571287a554901541a0 # v4.3
with:
qt: true
wm: herbstluftwm
- name: Install dependencies
run: |
pip install --upgrade pip
pip install setuptools tox tox-gh-actions
- name: Test with tox (with retry)
uses: Wandalen/wretry.action@e68c23e6309f2871ca8ae4763e7629b9c258e1ea # v3.8.0
with:
attempt_limit: 3
attempt_delay: 30000 # 30s
retry_condition: github.ref_name == 'main' # avoid restart in PR
command: python -m tox -v --pre --recreate
env:
PLATFORM: ${{ matrix.platform }}
BACKEND: ${{ matrix.backend }}
PYTHON: ${{ matrix.python }}
COVERAGE: "no_cov"
PYVISTA_OFF_SCREEN: True # required for opengl on windows
PIP_CONSTRAINT: resources/constraints/version_denylist.txt
PIP_EXTRA_INDEX_URL: https://www.riverbankcomputing.com/pypi/simple/
PIP_ONLY_BINARY: "PyQt5,PyQt6"
- name: Upload leaked viewer graph
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: leaked ${{ matrix.platform }} py ${{ matrix.python }} ${{ matrix.backend }}
path: ./*leak-backref-graph*.pdf
# If something goes wrong, we can open an issue in the repo
- name: Report Failures
if: ${{ failure() && github.event_name == 'schedule' }}
uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5 # v2.9.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PLATFORM: ${{ matrix.platform }}
PYTHON: ${{ matrix.python }}
BACKEND: ${{ matrix.backend }}
RUN_ID: ${{ github.run_id }}
TITLE: '[test-bot] pip install --pre is failing'
with:
filename: .github/TEST_FAIL_TEMPLATE.md
update_existing: true