Skip to content

Commit 3864399

Browse files
authored
Clean up workflows (#747)
1 parent 619fd23 commit 3864399

File tree

3 files changed

+39
-111
lines changed

3 files changed

+39
-111
lines changed

.github/workflows/python-macos.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/workflows/python-linux.yml renamed to .github/workflows/python-tests.yml

Lines changed: 39 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Jupyter Server Tests [Linux]
1+
name: Jupyter Server Tests
22
on:
33
push:
44
branches: ["main"]
@@ -37,8 +37,15 @@ jobs:
3737
strategy:
3838
fail-fast: false
3939
matrix:
40-
os: [ubuntu-latest]
41-
python-version: ["3.7", "3.8", "3.9", "3.10", "pypy-3.7"]
40+
os: [ubuntu-latest, windows-latest, macos-latest]
41+
python-version: ["3.7", "3.10"]
42+
include:
43+
- os: windows-latest
44+
python-version: "3.9"
45+
- os: ubuntu-latest
46+
python-version: "pypy-3.7"
47+
- os: macos-latest
48+
python-version: "3.8"
4249
steps:
4350
- name: Checkout
4451
uses: actions/checkout@v2
@@ -47,35 +54,41 @@ jobs:
4754
- name: Install the Python dependencies
4855
run: |
4956
pip install -e ".[test]" codecov
50-
- name: List installed packages
51-
run: |
52-
pip freeze
53-
pip check
5457
- name: Run the tests
55-
if: ${{ matrix.python-version != 'pypy-3.7' }}
58+
if: ${{ !startsWith(matrix.python-version, 'pypy') && !startsWith(matrix.os, 'windows') }}
5659
run: |
57-
pytest -vv --cov jupyter_server --cov-branch --cov-report term-missing:skip-covered --cov-fail-under 70 || pytest -vv --cov jupyter_server --cov-branch --cov-report term-missing:skip-covered --cov-fail-under 70 --lf
58-
- name: Run the tests on pypy
59-
if: ${{ matrix.python-version == 'pypy-3.7' }}
60+
args="-vv -raXs --cov jupyter_server --cov-branch --cov-report term-missing:skip-covered --durations 10 --color=yes --cov-fail-under 70"
61+
python -m pytest $args || python -m pytest $args --lf
62+
- name: Run the tests on pypy and windows
63+
if: ${{ startsWith(matrix.python-version, 'pypy') || startsWith(matrix.os, 'windows') }}
6064
run: |
61-
pytest -vv || pytest -vv -lf
65+
python -m pytest -vv -raXs || python -m pytest -vv -raXs --lf
66+
- name: Coverage
67+
run: |
68+
codecov
69+
70+
test_docs_and_examples:
71+
name: Test Docs and Examples
72+
timeout-minutes: 10
73+
runs-on: ubuntu-latest
74+
steps:
75+
- uses: actions/checkout@v2
76+
- name: Base Setup
77+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
6278
- name: Install the Python dependencies for the examples
6379
run: |
80+
pip install -e ".[test]"
6481
cd examples/simple && pip install -e .
6582
- name: Run the tests for the examples
6683
run: |
67-
pytest examples/simple
68-
- name: Coverage
69-
if: ${{ matrix.python-version != 'pypy-3.7' }}
70-
run: |
71-
codecov
84+
python -m pytest examples/simple
7285
- name: Test the docs
7386
run: |
7487
cd docs
7588
pip install -r doc-requirements.txt
7689
make html SPHINXOPTS="-W"
7790
78-
test_miniumum_verisons:
91+
test_miniumum_versions:
7992
name: Test Minimum Versions
8093
timeout-minutes: 20
8194
runs-on: ubuntu-latest
@@ -88,7 +101,9 @@ jobs:
88101
- name: Install miniumum versions
89102
uses: jupyterlab/maintainer-tools/.github/actions/install-minimums@v1
90103
- name: Run the unit tests
91-
run: pytest -vv|| pytest -vv --lf
104+
run: |
105+
args="-vv -raXs --durations 10 --color=yes"
106+
pytest $args || pytest $args --lf
92107
93108
test_prereleases:
94109
name: Test Prereleases
@@ -108,7 +123,8 @@ jobs:
108123
pip check
109124
- name: Run the tests
110125
run: |
111-
pytest -vv || pytest -vv --lf
126+
args="-vv -raXs --durations 10 --color=yes"
127+
pytest $args || pytest $args --lf
112128
113129
make_sdist:
114130
name: Make SDist
@@ -142,11 +158,11 @@ jobs:
142158
set -ex
143159
cd sdist
144160
mkdir test
145-
tar --strip-components=1 -zxvf jupyter_server* -C ./test
161+
tar --strip-components=1 -zxvf *.tar.gz -C ./test
146162
cd test
147163
pip install .[test]
148-
pip install pytest-github-actions-annotate-failures
149164
- name: Run Test
150165
run: |
151166
cd sdist/test
152-
pytest -vv || pytest -vv --lf
167+
args="-vv -raXs --durations 10 --color=yes"
168+
pytest $args || pytest $args --lf

.github/workflows/python-windows.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

0 commit comments

Comments
 (0)