77 schedule :
88 - cron : " 0 8 * * *"
99
10+ defaults :
11+ run :
12+ shell : bash -eux {0}
13+
1014jobs :
11- pre-commit :
15+ pre_commit :
1216 runs-on : ubuntu-latest
1317 steps :
1418 - uses : actions/checkout@v3
@@ -22,77 +26,65 @@ jobs:
2226 fail-fast : false
2327 matrix :
2428 os : [ubuntu-latest, windows-latest, macos-latest]
25- python-version : ["3.7 ", "3.10 "]
29+ python-version : ["3.8 ", "3.11 "]
2630 include :
2731 - os : windows-latest
2832 python-version : " 3.9"
2933 - os : ubuntu-latest
3034 python-version : " pypy-3.8"
31- - os : ubuntu-latest
32- python-version : " 3.11-dev"
3335 - os : macos-latest
34- python-version : " 3.8 "
36+ python-version : " 3.10 "
3537 steps :
3638 - name : Checkout
3739 uses : actions/checkout@v3
3840 - name : Base Setup
3941 uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
40- - name : Install the Python dependencies
41- run : |
42- pip install -e ".[test]"
43- - name : List installed packages
44- run : |
45- pip freeze
46- pip check
47- - name : Run the tests with Coverage
48- if : ${{ !startsWith(matrix.python-version, 'pypy') && !startsWith(runner.os, 'Windows') }}
49- run : |
50- pytest -vv --cov jupyter_server_terminals --cov-branch --cov-report term-missing:skip-covered || pytest -vv --lf
51- - name : Run the tests on pypy and Windows
52- if : ${{ startsWith(matrix.python-version, 'pypy') || startsWith(runner.os, 'Windows') }}
42+ - name : Run the tests
5343 run : |
54- pytest -vv || pytest -vv --lf
44+ hatch run cov:test --cov-fail-under 75 || hatch run test:test --lf
5545 - name : Coverage
56- if : ${{ !startsWith(matrix.python-version, 'pypy') && !startsWith(runner.os, 'Windows') }}
5746 run : |
5847 pip install codecov
5948 codecov
6049
50+ test_docs :
51+ name : Test Docs
52+ runs-on : ubuntu-latest
53+ steps :
54+ - uses : actions/checkout@v3
55+ - uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
56+ - run : hatch run docs:build
57+
6158 test_minimum_versions :
6259 name : Test Minimum Versions
6360 timeout-minutes : 20
6461 runs-on : ubuntu-latest
6562 steps :
6663 - uses : actions/checkout@v3
67- - name : Base Setup
68- uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
64+ - uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
6965 with :
70- python_version : " 3.7"
71- - name : Install miniumum versions
72- uses : jupyterlab/maintainer-tools/.github/actions/install-minimums@v1
66+ python_version : " 3.8"
67+ - uses : jupyterlab/maintainer-tools/.github/actions/install-minimums@v1
68+ with :
69+ only_create_file : 1
7370 - name : Run the unit tests
7471 run : |
75- pytest -vv -W default || pytest -vv -W default --lf
72+ export PIP_CONSTRAINT="./contraints_file.txt"
73+ hatch run test:nowarn || hatch run test:nowarn --lf
7674
7775 test_prereleases :
7876 name : Test Prereleases
7977 runs-on : ubuntu-latest
8078 timeout-minutes : 20
8179 steps :
82- - name : Checkout
83- uses : actions/checkout@v3
84- - name : Base Setup
85- uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
86- - name : Install the Python dependencies
87- run : |
88- pip install --pre -e ".[test]"
89- - name : List installed packages
90- run : |
91- pip freeze
92- pip check
80+ - uses : actions/checkout@v3
81+ - uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
82+ with :
83+ python_version : " 3.11"
9384 - name : Run the tests
9485 run : |
95- pytest -vv -W default || pytest -vv -W default --lf
86+ export PIP_PRE=1
87+ hatch run test:nowarn || hatch run test:nowarn --lf
9688
9789 make_sdist :
9890 name : Make SDist
@@ -136,3 +128,21 @@ jobs:
136128 - uses : actions/checkout@v3
137129 - uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
138130 - uses : jupyterlab/maintainer-tools/.github/actions/check-links@v1
131+
132+ tests_check : # This job does nothing and is only used for the branch protection
133+ if : always()
134+ needs :
135+ - test
136+ - pre_commit
137+ - test_docs
138+ - test_minimum_versions
139+ - test_prereleases
140+ - check_links
141+ - check_release
142+ - test_sdist
143+ runs-on : ubuntu-latest
144+ steps :
145+ - name : Decide whether the needed jobs succeeded or failed
146+ uses : re-actors/alls-green@release/v1
147+ with :
148+ jobs : ${{ toJSON(needs) }}
0 commit comments