Skip to content

Commit 7f598dd

Browse files
authored
Merge pull request #887 from blink1073/even-more-ci-cleanup
2 parents 5e9a933 + f4f80b1 commit 7f598dd

File tree

1 file changed

+30
-27
lines changed

1 file changed

+30
-27
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,19 @@ defaults:
1515

1616
jobs:
1717
build:
18-
runs-on: ${{ matrix.os }}-latest
18+
runs-on: ${{ matrix.os }}
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
os: [ubuntu, macos, windows]
23-
python-version: [ '3.7', '3.8', '3.10', 'pypy-3.7' ]
24-
exclude:
25-
- os: windows
26-
python-version: pypy-3.7
22+
os: [ubuntu-latest, windows-latest, macos-latest]
23+
python-version: ["3.7", "3.10"]
24+
include:
25+
- os: windows-latest
26+
python-version: "3.9"
27+
- os: ubuntu-latest
28+
python-version: "pypy-3.7"
29+
- os: macos-latest
30+
python-version: "3.8"
2731
steps:
2832
- name: Checkout
2933
uses: actions/checkout@v2
@@ -36,12 +40,12 @@ jobs:
3640
pip install .[test] codecov
3741
3842
- name: Install matplotlib
39-
if: ${{ matrix.os != 'macos' && matrix.python-version != 'pypy3' }}
43+
if: ${{ !startsWith(matrix.os, 'macos') && !startsWith(matrix.python-version, 'pypy') }}
4044
run: |
4145
pip install matplotlib || echo 'failed to install matplotlib'
4246
4347
- name: Install alternate event loops
44-
if: ${{ matrix.os != 'windows' }}
48+
if: ${{ !startsWith(matrix.os, 'windows') }}
4549
run: |
4650
pip install curio || echo 'ignoring curio install failure'
4751
pip install trio || echo 'ignoring trio install failure'
@@ -57,32 +61,32 @@ jobs:
5761
5862
- name: Run the tests
5963
timeout-minutes: 15
60-
if: ${{ !startsWith( matrix.python-version, 'pypy' ) && matrix.os != 'windows' }}
64+
if: ${{ !startsWith( matrix.python-version, 'pypy' ) && !startsWith(matrix.os, 'windows') }}
6165
run: |
62-
args="-vv -raXxs --cov ipykernel --cov-branch --cov-report term-missing:skip-covered --durations 10 --color=yes"
63-
pytest $args || pytest $args --lf
66+
cmd="python -m pytest -vv -raXs --cov ipykernel --cov-branch --cov-report term-missing:skip-covered --durations 10 --color=yes"
67+
$cmd || $cmd --lf
6468
6569
- name: Run the tests on pypy and windows
6670
timeout-minutes: 15
67-
if: ${{ startsWith( matrix.python-version, 'pypy' ) || matrix.os == 'windows' }}
71+
if: ${{ startsWith( matrix.python-version, 'pypy' ) || startsWith(matrix.os, 'windows') }}
6872
run: |
69-
args="-vv -raXxs --durations 10 --color=yes"
70-
pytest $args || pytest $args --lf
73+
cmd="python -m pytest -vv -raXs --durations 10 --color=yes"
74+
$cmd || $cmd --lf
7175
7276
- name: Coverage
7377
run: |
7478
codecov
7579
7680
test_docs:
77-
runs-on: ${{ matrix.os }}-latest
81+
runs-on: ${{ matrix.os }}
7882
strategy:
7983
fail-fast: false
8084
matrix:
81-
os: [ubuntu]
85+
os: [ubuntu-latest]
8286
python-version: [ '3.9' ]
8387
exclude:
84-
- os: windows
85-
python-version: pypy3
88+
- os: windows-latest
89+
python-version: pypy-3.7
8690
steps:
8791
- name: Checkout
8892
uses: actions/checkout@v2
@@ -91,7 +95,6 @@ jobs:
9195
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
9296

9397
- name: Build the docs
94-
if: ${{ matrix.os == 'ubuntu' && matrix.python-version == '3.9'}}
9598
run: |
9699
cd docs
97100
pip install -r requirements.txt
@@ -132,8 +135,8 @@ jobs:
132135
- name: Run the tests
133136
timeout-minutes: 10
134137
run: |
135-
args="-vv -raXxs --durations 10 --color=yes"
136-
pytest $args || pytest $args --lf
138+
cmd="python -m pytest -vv -raXxs --durations 10 --color=yes"
139+
$cmd || $cmd --lf
137140
138141
test_miniumum_versions:
139142
name: Test Minimum Versions
@@ -149,8 +152,8 @@ jobs:
149152
uses: jupyterlab/maintainer-tools/.github/actions/install-minimums@v1
150153
- name: Run the unit tests
151154
run: |
152-
args="-vv -raXxs --durations 10 --color=yes"
153-
pytest $args || pytest $args --lf
155+
cmd="python -m pytest -vv -raXxs --durations 10 --color=yes"
156+
$cmd || $cmd --lf
154157
155158
test_prereleases:
156159
name: Test Prereleases
@@ -170,8 +173,8 @@ jobs:
170173
pip check
171174
- name: Run the tests
172175
run: |
173-
args="-vv -raXxs --durations 10 --color=yes"
174-
pytest $args || pytest $args --lf
176+
cmd="python -m pytest -vv -raXs --durations 10 --color=yes"
177+
$cmd || $cmd --lf
175178
176179
make_sdist:
177180
name: Make SDist
@@ -211,5 +214,5 @@ jobs:
211214
- name: Run Test
212215
run: |
213216
cd sdist/test
214-
args="-vv -raXxs --durations 10 --color=yes"
215-
pytest $args || pytest $args --lf
217+
cmd="python -m pytest -vv -raXs --durations 10 --color=yes"
218+
$cmd || $cmd --lf

0 commit comments

Comments
 (0)