Skip to content

--pre Test

--pre Test #3272

# 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'
env:
COLUMNS: 120
jobs:
test:
name: ${{ matrix.platform }} py${{ matrix.python }} ${{ matrix.backend }} --pre
timeout-minutes: 40
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-latest, ubuntu-latest]
python: [3.12]
backend: [pyqt5, pyqt6]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache-dependency-path: pyproject.toml
- uses: tlambert03/setup-qt-libs@v1
- 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
if (Test-Path -Path "C:\Windows\system32\opengl32.dll" -PathType Leaf) {Exit 0} else {Exit 1}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install setuptools tox tox-gh-actions
- name: Test with tox
# run tests using pip install --pre
uses: aganders3/headless-gui@v2
with:
run: python -m tox -v --pre
env:
PLATFORM: ${{ matrix.platform }}
BACKEND: ${{ matrix.backend }}
COVERAGE: "no_cov"
PYVISTA_OFF_SCREEN: True # required for opengl on windows
# 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@v2
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