12
12
PYTHONDONTWRITEBYTECODE : 1
13
13
14
14
jobs :
15
- # Run "pre-commit run --all-files --hook-stage=manual"
16
- pre-commit :
17
- runs-on : ubuntu-20.04
18
- timeout-minutes : 5
15
+ pre_commit :
16
+ runs-on : ubuntu-latest
19
17
steps :
20
- - uses : actions/checkout@v2
18
+ - uses : actions/checkout@v3
21
19
- uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
22
- -
uses :
pre-commit/[email protected]
23
- with :
24
- extra_args : --all-files --hook-stage=manual
25
- - name : Help message if pre-commit fail
26
- if : ${{ failure() }}
27
- run : |
28
- echo "You can install pre-commit hooks to automatically run formatting"
29
- echo "on each commit with:"
30
- echo " pre-commit install"
31
- echo "or you can run by hand on staged files with"
32
- echo " pre-commit run"
33
- echo "or after-the-fact on already committed files with"
34
- echo " pre-commit run --all-files --hook-stage=manual"
35
-
36
- check-links :
20
+ - uses : jupyterlab/maintainer-tools/.github/actions/pre-commit@v1
21
+
22
+ check_links :
37
23
runs-on : ubuntu-20.04
38
24
steps :
39
25
- uses : actions/checkout@v2
@@ -54,15 +40,15 @@ jobs:
54
40
- name : Run the tests with coverage on Ubuntu
55
41
if : ${{ matrix.os == 'ubuntu-latest' }}
56
42
run : |
57
- hatch run cov:test -n auto || hatch run test:test --lf
43
+ hatch run cov:test -n auto --cov-fail-under 80 || hatch run test:test --lf
58
44
pip install codecov
59
45
codecov
60
46
61
47
- name : Run the tests on Windows and MacOS
62
48
if : ${{ matrix.os != 'ubuntu-latest' }}
63
- run : hatch run test :test -s -n auto || hatch run test :test -s --lf
49
+ run : hatch run cov :test -s -n auto || hatch run cov :test -s --lf
64
50
65
- generate-changelog :
51
+ generate_changelog :
66
52
runs-on : ubuntu-20.04
67
53
timeout-minutes : 10
68
54
steps :
90
76
python -m jupyter_releaser.actions.generate-changelog
91
77
cat CHANGELOG_ENTRY.md
92
78
79
+ test_minimum_versions :
80
+ name : Test Minimum Versions
81
+ timeout-minutes : 20
82
+ runs-on : ubuntu-latest
83
+ steps :
84
+ - uses : actions/checkout@v3
85
+ - uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
86
+ with :
87
+ python_version : " 3.8"
88
+ - uses : jupyterlab/maintainer-tools/.github/actions/install-minimums@v1
89
+ with :
90
+ only_create_file : 1
91
+ - name : Run the unit tests
92
+ run : |
93
+ export PIP_CONSTRAINT="./contraints_file.txt"
94
+ hatch run test:nowarn || hatch run test:nowarn --lf
95
+
96
+ test_prereleases :
97
+ name : Test Prereleases
98
+ runs-on : ubuntu-latest
99
+ timeout-minutes : 20
100
+ steps :
101
+ - uses : actions/checkout@v3
102
+ - uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
103
+ with :
104
+ python_version : " 3.11"
105
+ - name : Run the tests
106
+ run : |
107
+ export PIP_PRE=1
108
+ hatch run test:nowarn || hatch run test:nowarn --lf
109
+
93
110
docs :
94
111
runs-on : ubuntu-20.04
95
112
timeout-minutes : 10
@@ -127,12 +144,14 @@ jobs:
127
144
check : # This job does nothing and is only used for the branch protection
128
145
if : always()
129
146
needs :
130
- - check-links
147
+ - check_links
131
148
- test
132
149
- docs
133
- - pre-commit
150
+ - pre_commit
134
151
- check_local_actions
135
- - generate-changelog
152
+ - test_minimum_versions
153
+ - test_prereleases
154
+ - generate_changelog
136
155
runs-on : ubuntu-latest
137
156
steps :
138
157
- name : Decide whether the needed jobs succeeded or failed
0 commit comments