Skip to content

updating python versions on CI #117

updating python versions on CI

updating python versions on CI #117

# Reference: napari/napari github workflows
name: test PR
on:
pull_request:
branches:
- main
jobs:
test:
name: ${{ matrix.platform }} ${{ matrix.python }} ${{ matrix.toxenv || matrix.backend }}
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest]
python: ["3.10", "3.11"]
backend: [pyqt5]
include:
- python: 3.11
platform: windows-latest
backend: pyqt5
- python: 3.11
platform: macos-latest
backend: pyside2
- python: 3.11
platform: ubuntu-latest
backend: pyqt6
- python: 3.11
platform: ubuntu-latest
backend: pyside2
- python: 3.11 # only this run execute coverage
platform: ubuntu-latest
backend: pyside6
coverage: true
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }} 64-bit for Windows
if: runner.os == 'Windows'
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: 'x64'
cache: 'pip'
- name: Set up Python ${{ matrix.python }}
if: runner.os != 'Windows'
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pip'
- 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
# tox and tox-gh-actions will take care of the "actual" installation
# of python dependendencies into a virtualenv. see tox.ini for more
- name: Install dependencies
run: |
pip install --upgrade pip
pip install setuptools tox tox-gh-actions
pip install .
# here we pass off control of environment creation and running of tests to tox
# tox-gh-actions, installed above, helps to convert environment variables into
# tox "factors" ... limiting the scope of what gets tested on each platform
# for instance, on ubuntu-latest with python 3.8, it would be equivalent to this command:
# `tox -e py38-linux-pyqt,py38-linux-pyside`
# see tox.ini for more
- name: Test with tox
uses: GabrielBB/xvfb-action@v1
with:
run: python -m tox
env:
PLATFORM: ${{ matrix.platform }}
BACKEND: ${{ matrix.backend }}
TOXENV: ${{ matrix.toxenv }}
- name: Coverage
if: ${{ matrix.coverage }}
uses: codecov/codecov-action@v3