@@ -6,58 +6,57 @@ concurrency:
66
77on :
88 push :
9- branches :
10- - main
11- tags :
12- - " v*" # Push events to matching v*, i.e. v1.0, v20.15.10
9+ branches : [main]
10+ tags : [v*]
1311 pull_request :
14- branches :
15- - main
1612 workflow_dispatch :
13+ schedule :
14+ - cron : " 0 0 * * *" # run once a day
1715
1816jobs :
1917 test :
20- name : ${{ matrix.platform }} (${{ matrix.python-version }}) ${{ matrix.backend }}
21- runs-on : ${{ matrix.platform }}
18+ name : Test
19+ uses : pyapp-kit/workflows/.github/workflows/test-pyrepo.yml@v1
20+ with :
21+ os : ${{ matrix.os }}
22+ python-version : ${{ matrix.python-version }}
23+ qt : ${{ matrix.qt }}
24+ pip-install-pre-release : ${{ github.event_name == 'schedule' }}
25+ report-failures : ${{ github.event_name == 'schedule' }}
26+ secrets : inherit
2227 strategy :
2328 fail-fast : false
2429 matrix :
2530 python-version : ["3.8", "3.9", "3.10", "3.11"]
26- platform : [ubuntu-latest, macos-latest, windows-latest]
27- backend : [pyqt5, pyside2]
31+ os : [ubuntu-latest, macos-latest, windows-latest]
32+ qt : [pyqt5, pyside2]
2833 include :
2934 - python-version : " 3.10"
30- platform : ubuntu-latest
31- backend : pyqt6
35+ os : ubuntu-latest
36+ qt : pyqt6
3237 - python-version : " 3.10"
33- platform : ubuntu-latest
34- backend : pyside6
38+ os : ubuntu-latest
39+ qt : pyside6
3540 - python-version : " 3.12"
36- platform : ubuntu-latest
37- backend : pyqt6
41+ os : ubuntu-latest
42+ qt : pyqt6
3843 exclude :
3944 - python-version : " 3.11"
40- backend : pyside2
41-
42- steps :
43- - uses : actions/checkout@v4
44- - name : Set up Python ${{ matrix.python-version }}
45- uses : actions/setup-python@v5
46- with :
47- python-version : ${{ matrix.python-version }}
48- -
uses :
tlambert03/[email protected] 49- - name : Install dependencies
50- run : python -m pip install --upgrade hatch
51-
52- - name : Test
53- uses : aganders3/headless-gui@v2
54- with :
55- run : hatch -v run +backend=${{ matrix.backend }} test:run
56-
57- - name : Coverage
58- uses : codecov/codecov-action@v4
59- with :
60- token : ${{ secrets.CODECOV_TOKEN }}
45+ qt : pyside2
46+
47+ test-min-reqs :
48+ name : Test min reqs
49+ uses : pyapp-kit/workflows/.github/workflows/test-pyrepo.yml@main
50+ with :
51+ os : ubuntu-latest
52+ python-version : ${{ matrix.python-version }}
53+ qt : pyqt5
54+ pip-install-min-reqs : true
55+ secrets : inherit
56+ strategy :
57+ fail-fast : false
58+ matrix :
59+ python-version : ["3.8", "3.9", "3.10", "3.11"]
6160
6261 test-pydantic1 :
6362 name : Test pydantic1
@@ -85,110 +84,33 @@ jobs:
8584 with :
8685 token : ${{ secrets.CODECOV_TOKEN }}
8786
88- test_napari :
89- name : napari tests
90- runs-on : ubuntu-latest
91- steps :
92- - uses : actions/checkout@v4
93- - uses : actions/checkout@v4
94- with :
95- repository : napari/napari
96- path : napari-from-github
97- -
uses :
tlambert03/[email protected] 98- - uses : actions/setup-python@v5
99- with :
100- python-version : " 3.10"
101- - name : Install
102- run : |
103- python -m pip install --upgrade pip pytest-pretty
104- python -m pip install -e .[testing]
105- python -m pip install -e ./napari-from-github[pyqt5]
106-
107- - name : Test napari magicgui
108- uses : aganders3/headless-gui@v2
109- with :
110- working-directory : napari-from-github
111- run : pytest -W ignore napari/_tests/test_magicgui.py -v --color=yes
112-
113- test_magicclass :
114- name : magic-class tests
115- runs-on : ubuntu-latest
116- steps :
117- - uses : actions/checkout@v4
118- - uses : actions/checkout@v4
119- with :
120- repository : hanjinliu/magic-class
121- path : magic-class
122- -
uses :
tlambert03/[email protected] 123- - uses : actions/setup-python@v5
124- with :
125- python-version : " 3.10"
126- - name : Install
127- run : |
128- python -m pip install --upgrade pip
129- python -m pip install -e .[testing,pyqt5]
130- python -m pip install ./magic-class[testing]
131-
132- - name : Test magicclass
133- uses : aganders3/headless-gui@v2
134- # magicclass is still in development, don't fail the whole build
135- # this makes this much less useful... but it's better than nothing?
136- continue-on-error : true
137- with :
138- working-directory : magic-class
139- run : pytest -v --color=yes
140-
141- test_stardist :
142- name : stardist tests
143- runs-on : ubuntu-latest
144- steps :
145- - uses : actions/checkout@v4
146- - uses : actions/checkout@v4
147- with :
148- repository : stardist/stardist-napari
149- path : stardist-napari
150- -
uses :
tlambert03/[email protected] 151- - uses : actions/setup-python@v5
152- with :
153- python-version : " 3.10"
154- - name : Install
155- run : |
156- python -m pip install --upgrade pip
157- python -m pip install -e .[testing]
158- python -m pip install ./stardist-napari[test]
159-
160- - name : Run stardist tests
161- uses : aganders3/headless-gui@v2
162- with :
163- working-directory : stardist-napari
164- run : python -m pytest -v --color=yes -W ignore stardist_napari
165- env :
166- STARDIST_NAPARI_NOTHREADS : true
167- STARDIST_NAPARI_NOPERSIST : true
168-
169- test_partseg :
170- name : partseg tests
171- runs-on : ubuntu-latest
172- steps :
173- - uses : actions/checkout@v4
174- - uses : actions/checkout@v4
175- with :
176- repository : 4DNucleome/PartSeg
177- path : PartSeg
178- -
uses :
tlambert03/[email protected] 179- - uses : actions/setup-python@v5
180- with :
181- python-version : " 3.10"
182- - name : Install
183- run : |
184- python -m pip install -e .[testing]
185- python -m pip install ./PartSeg[test,pyqt5]
186-
187- - name : Run PartSeg tests
188- uses : aganders3/headless-gui@v2
189- with :
190- working-directory : PartSeg
191- run : python -m pytest -v --color=yes -W ignore package/tests/test_PartSeg/test_napari_widgets.py
87+ test-dependents :
88+ uses : pyapp-kit/workflows/.github/workflows/test-dependents.yml@v1
89+ with :
90+ dependency-repo : ${{ matrix.package }}
91+ dependency-ref : ${{ matrix.package-version }}
92+ dependency-extras : ${{ matrix.package-extras || 'testing' }}
93+ host-extras : " testing"
94+ qt : pyqt5
95+ python-version : " 3.10"
96+ post-install-cmd : " python -m pip install pytest-pretty"
97+ pytest-args : ${{ matrix.pytest-args }}
98+ strategy :
99+ fail-fast : false
100+ matrix :
101+ include :
102+ - package : napari/napari
103+ pytest-args : napari/_tests/test_magicgui.py
104+ - package : napari/napari
105+ package-version : " v0.4.18"
106+ pytest-args : napari/_tests/test_magicgui.py
107+ - package : hanjinliu/magic-class
108+ - package : stardist/stardist-napari
109+ package-extras : test
110+ pytest-args : stardist_napari
111+ - package : 4DNucleome/PartSeg
112+ package-extras : test
113+ pytest-args : package/tests/test_PartSeg/test_napari_widgets.py
192114
193115 deploy :
194116 needs : test
0 commit comments