Skip to content

Commit

Permalink
[Maint] Fix CI (#63)
Browse files Browse the repository at this point in the history
* Update tox.ini

* update test action

* fix python version in napari test.

* try to fix napari test dependencies

* try conventional pip install

* try git+ again

* no quotes?

* typo

* ignore the no hooks warning

* fix filter

* fix the filter?

* try tox.ini instead
  • Loading branch information
psobolewskiPhD authored Feb 20, 2025
1 parent aa9bccd commit b6f1979
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 18 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ jobs:
fail-fast: false
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9, '3.10']
python-version: ['3.10', 3.11, 3.12, 3.13]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -30,24 +33,24 @@ jobs:
run: tox
env:
PLATFORM: ${{ matrix.platform }}
- uses: codecov/codecov-action@v2
- uses: codecov/codecov-action@v3

napari:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: "3.10"
- uses: tlambert03/setup-qt-libs@v1
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
uses: GabrielBB/xvfb-action@v1
uses: aganders3/headless-gui@v2
with:
run: tox
run: python -m tox -v
env:
PLATFORM: ubuntu-latest
TOXENV: napari
25 changes: 16 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,35 +1,42 @@
[tox]
envlist = py{36,37,38,39,310}-{linux,macos,windows}
envlist = py{310,311, 312, 313}-{linux,macos,windows}
toxworkdir=/tmp/.tox

[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312
3.13: py313

[gh-actions:env]
PLATFORM =
ubuntu-latest: linux
macos-latest: macos
windows-latest: windows
ubuntu-18.04: linux
ubuntu-22.04: linux

[testenv]
platform =
linux: linux
macos: darwin
windows: win32
passenv = CI GITHUB_ACTIONS DISPLAY XAUTHORITY
passenv =
CI
GITHUB_ACTIONS
DISPLAY
XAUTHORITY
extras = test
commands = pytest --color=yes -v --cov --cov-report=xml {posargs}

[pytest]
filterwarnings =
ignore:.*has no hooks:UserWarning

[testenv:napari]
basepython = python3.8
basepython = python3.10
deps =
git+https://github.com/napari/napari.git#egg=napari[all,testing]
napari[pyqt, testing] @ git+https://github.com/napari/napari.git
commands =
pytest -v --color=yes --pyargs napari {posargs}

Expand Down

0 comments on commit b6f1979

Please sign in to comment.