@@ -14,6 +14,30 @@ defaults:
14
14
shell : bash
15
15
16
16
jobs :
17
+ # Run "pre-commit run --all-files"
18
+ pre-commit :
19
+ runs-on : ubuntu-20.04
20
+ timeout-minutes : 2
21
+
22
+ steps :
23
+ - uses : actions/checkout@v2
24
+ - uses : actions/setup-python@v2
25
+ with :
26
+ python-version : 3.8
27
+
28
+ # ref: https://github.com/pre-commit/action
29
+ -
uses :
pre-commit/[email protected]
30
+ - name : Help message if pre-commit fail
31
+ if : ${{ failure() }}
32
+ run : |
33
+ echo "You can install pre-commit hooks to automatically run formatting"
34
+ echo "on each commit with:"
35
+ echo " pre-commit install"
36
+ echo "or you can run by hand on staged files with"
37
+ echo " pre-commit run"
38
+ echo "or after-the-fact on already committed files with"
39
+ echo " pre-commit run --all-files"
40
+
17
41
build :
18
42
runs-on : ${{ matrix.os }}
19
43
strategy :
@@ -63,14 +87,14 @@ jobs:
63
87
timeout-minutes : 15
64
88
if : ${{ !startsWith( matrix.python-version, 'pypy' ) && !startsWith(matrix.os, 'windows') }}
65
89
run : |
66
- cmd="python -m pytest -vv -raXs -- cov ipykernel --cov-branch --cov-report term-missing:skip-covered --durations 10 --color=yes "
90
+ cmd="python -m pytest -vv -- cov ipykernel --cov-branch --cov-report term-missing:skip-covered"
67
91
$cmd || $cmd --lf
68
92
69
93
- name : Run the tests on pypy and windows
70
94
timeout-minutes : 15
71
95
if : ${{ startsWith( matrix.python-version, 'pypy' ) || startsWith(matrix.os, 'windows') }}
72
96
run : |
73
- cmd="python -m pytest -vv -raXs --durations 10 --color=yes "
97
+ cmd="python -m pytest -vv"
74
98
$cmd || $cmd --lf
75
99
76
100
- name : Coverage
@@ -135,7 +159,7 @@ jobs:
135
159
- name : Run the tests
136
160
timeout-minutes : 10
137
161
run : |
138
- cmd="python -m pytest -vv -raXxs --durations 10 --color=yes "
162
+ cmd="python -m pytest -vv -raXxs"
139
163
$cmd || $cmd --lf
140
164
141
165
test_miniumum_versions :
@@ -152,7 +176,7 @@ jobs:
152
176
uses : jupyterlab/maintainer-tools/.github/actions/install-minimums@v1
153
177
- name : Run the unit tests
154
178
run : |
155
- cmd="python -m pytest -vv -raXxs --durations 10 --color=yes "
179
+ cmd="python -m pytest -vv -raXxs"
156
180
$cmd || $cmd --lf
157
181
158
182
test_prereleases :
@@ -173,7 +197,7 @@ jobs:
173
197
pip check
174
198
- name : Run the tests
175
199
run : |
176
- cmd="python -m pytest -vv -raXs --durations 10 --color=yes "
200
+ cmd="python -m pytest -vv"
177
201
$cmd || $cmd --lf
178
202
179
203
make_sdist :
@@ -214,5 +238,5 @@ jobs:
214
238
- name : Run Test
215
239
run : |
216
240
cd sdist/test
217
- cmd="python -m pytest -vv -raXs --durations 10 --color=yes "
241
+ cmd="python -m pytest -vv"
218
242
$cmd || $cmd --lf
0 commit comments