Skip to content

Commit f423992

Browse files
committed
ci cleanup
1 parent 268984f commit f423992

File tree

2 files changed

+98
-14
lines changed

2 files changed

+98
-14
lines changed

.github/workflows/ci.yml

Lines changed: 97 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
- name: Install the Python dependencies
3131
run: |
32-
pip install --pre --upgrade --upgrade-strategy=eager .[test] codecov
32+
pip install .[test] codecov
3333
3434
- name: Install matplotlib
3535
if: ${{ matrix.os != 'macos' && matrix.python-version != 'pypy3' }}
@@ -55,26 +55,22 @@ jobs:
5555
timeout-minutes: 10
5656
if: ${{ !startsWith( matrix.python-version, 'pypy' ) }}
5757
run: |
58-
pytest ipykernel -vv -s --cov ipykernel --cov-branch --cov-report term-missing:skip-covered --durations 10
58+
args="-vv -raXxs --cov ipykernel --cov-branch --cov-report term-missing:skip-covered --durations 10 --color=yes"
59+
pytest $args|| pytest $args --lf"
60+
pytest $args || pytest $args --lf
5961
6062
- name: Run the tests on pypy
6163
timeout-minutes: 15
6264
if: ${{ startsWith( matrix.python-version, 'pypy' ) }}
6365
run: |
64-
pytest -vv ipykernel
65-
66-
- name: Build the docs
67-
if: ${{ matrix.os == 'ubuntu' && matrix.python-version == '3.9'}}
68-
run: |
69-
cd docs
70-
pip install -r requirements.txt
71-
make html
66+
args="-vv -raXxs --durations 10 --color=yes"
67+
pytest $args || pytest $args --lf
7268
7369
- name: Coverage
7470
run: |
7571
codecov
7672
77-
check_docstrings:
73+
test_docs:
7874
runs-on: ${{ matrix.os }}-latest
7975
strategy:
8076
fail-fast: false
@@ -91,9 +87,16 @@ jobs:
9187
- name: Base Setup
9288
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
9389

90+
- name: Build the docs
91+
if: ${{ matrix.os == 'ubuntu' && matrix.python-version == '3.9'}}
92+
run: |
93+
cd docs
94+
pip install -r requirements.txt
95+
make html SPHINXOPTS="-W"
96+
9497
- name: Install the Python dependencies
9598
run: |
96-
pip install --pre --upgrade --upgrade-strategy=eager .
99+
pip install .
97100
pip install velin
98101
99102
- name: Check Docstrings
@@ -116,7 +119,7 @@ jobs:
116119

117120
- name: Install the Python dependencies without debugpy
118121
run: |
119-
pip install --pre --upgrade --upgrade-strategy=eager .[test]
122+
pip install .[test]
120123
pip uninstall --yes debugpy
121124
122125
- name: List installed packages
@@ -126,4 +129,84 @@ jobs:
126129
- name: Run the tests
127130
timeout-minutes: 10
128131
run: |
129-
pytest ipykernel -vv -s --durations 10
132+
args="-vv -raXxs --durations 10 --color=yes"
133+
pytest $args || pytest $args --lf
134+
135+
test_miniumum_versions:
136+
name: Test Minimum Versions
137+
timeout-minutes: 20
138+
runs-on: ubuntu-latest
139+
steps:
140+
- uses: actions/checkout@v2
141+
- name: Base Setup
142+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
143+
with:
144+
python_version: "3.7"
145+
- name: Install miniumum versions
146+
uses: jupyterlab/maintainer-tools/.github/actions/install-minimums@v1
147+
- name: Run the unit tests
148+
run: |
149+
args="-vv -raXxs --durations 10 --color=yes"
150+
pytest $args|| pytest $args --lf
151+
152+
test_prereleases:
153+
name: Test Prereleases
154+
runs-on: ubuntu-latest
155+
timeout-minutes: 20
156+
steps:
157+
- name: Checkout
158+
uses: actions/checkout@v2
159+
- name: Base Setup
160+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
161+
- name: Install the Python dependencies
162+
run: |
163+
pip install --pre -e ".[test]"
164+
- name: List installed packages
165+
run: |
166+
pip freeze
167+
pip check
168+
- name: Run the tests
169+
run: |
170+
args="-vv -raXxs --durations 10 --color=yes"
171+
pytest $args|| pytest $args --lf
172+
173+
make_sdist:
174+
name: Make SDist
175+
runs-on: ubuntu-latest
176+
timeout-minutes: 20
177+
steps:
178+
- uses: actions/checkout@v2
179+
- name: Base Setup
180+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
181+
- name: Build SDist
182+
run: |
183+
pip install build
184+
python -m build --sdist
185+
- uses: actions/upload-artifact@v2
186+
with:
187+
name: "sdist"
188+
path: dist/*.tar.gz
189+
190+
test_sdist:
191+
runs-on: ubuntu-latest
192+
needs: [make_sdist]
193+
name: Install from SDist and Test
194+
timeout-minutes: 20
195+
steps:
196+
- name: Base Setup
197+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
198+
- name: Download sdist
199+
uses: actions/download-artifact@v2
200+
- name: Install From SDist
201+
run: |
202+
set -ex
203+
cd sdist
204+
mkdir test
205+
tar --strip-components=1 -zxvf *.tar.gz -C ./test
206+
cd test
207+
pip install .[test]
208+
- name: Run Test
209+
run: |
210+
cd sdist/test
211+
args="-vv -raXxs --durations 10 --color=yes"
212+
pytest $args|| pytest $args --lf

.github/workflows/downstream.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
uses: jupyterlab/maintainer-tools/.github/actions/downstream-test@v1
5353
with:
5454
package_name: ipyparallel
55+
package_spec: "-e \".[test]\""
5556

5657
jupyter_kernel_test:
5758
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)