File tree Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Expand file tree Collapse file tree 3 files changed +27
-3
lines changed Original file line number Diff line number Diff line change 47
47
run : |
48
48
codecov
49
49
50
+ pre-commit :
51
+ name : Run pre-commit hook
52
+ runs-on : ubuntu-latest
53
+ timeout-minutes : 5
54
+ steps :
55
+ - name : Checkout
56
+ uses : actions/checkout@v2
57
+ - uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
58
+ - name : Run pre-commit
59
+ uses :
pre-commit/[email protected]
60
+ - name : Help message if pre-commit fail
61
+ if : ${{ failure() }}
62
+ run : |
63
+ echo "You can install pre-commit hooks to automatically run formatting"
64
+ echo "on each commit with:"
65
+ echo " pre-commit install"
66
+ echo "or you can run by hand on staged files with"
67
+ echo " pre-commit run"
68
+ echo "or after-the-fact on already committed files with"
69
+ echo " pre-commit run --all-files --hook-stage=manual"
70
+
50
71
docs :
51
72
name : Docs Build
52
73
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1
- ci :
2
- skip : [check-jsonschema]
3
-
4
1
repos :
5
2
- repo : https://github.com/pre-commit/pre-commit-hooks
6
3
rev : v4.1.0
48
45
hooks :
49
46
- id : doc8
50
47
args : [--max-line-length=200]
48
+ stages : [manual]
51
49
52
50
- repo : https://github.com/pycqa/flake8
53
51
rev : 4.0.1
59
57
" flake8-logging-format==0.6.0" ,
60
58
" flake8-implicit-str-concat==0.2.0" ,
61
59
]
60
+ stages : [manual]
62
61
63
62
- repo : https://github.com/sirosen/check-jsonschema
64
63
rev : 0.14.2
68
67
files : ^\.github/workflows/
69
68
types : [yaml]
70
69
args : ["--schemafile", "https://json.schemastore.org/github-workflow"]
70
+ stages : [manual]
Original file line number Diff line number Diff line change @@ -62,3 +62,6 @@ If you have already committed files before setting up the pre-commit
62
62
hook with ` pre-commit install ` , you can fix everything up using
63
63
` pre-commit run --all-files ` . You need to make the fixing commit
64
64
yourself after that.
65
+
66
+ Some of the hooks only run on CI by default, but you can invoke them by
67
+ running with the ` --hook-stage manual ` argument.
You can’t perform that action at this time.
0 commit comments