File tree Expand file tree Collapse file tree 4 files changed +27
-31
lines changed Expand file tree Collapse file tree 4 files changed +27
-31
lines changed Original file line number Diff line number Diff line change 43
43
run : |
44
44
codecov
45
45
46
+ pre-commit :
47
+ name : pre-commit
48
+ runs-on : ubuntu-latest
49
+ steps :
50
+ - uses : actions/checkout@v2
51
+ - uses : actions/setup-python@v2
52
+ -
uses :
pre-commit/[email protected]
53
+ with :
54
+ extra_args : --all-files --hook-stage=manual
55
+ - name : Help message if pre-commit fail
56
+ if : ${{ failure() }}
57
+ run : |
58
+ echo "You can install pre-commit hooks to automatically run formatting"
59
+ echo "on each commit with:"
60
+ echo " pre-commit install"
61
+ echo "or you can run by hand on staged files with"
62
+ echo " pre-commit run"
63
+ echo "or after-the-fact on already committed files with"
64
+ echo " pre-commit run --all-files --hook-stage=manual"
65
+
46
66
test_docs_and_examples :
47
67
name : Test Docs and Examples
48
68
timeout-minutes : 10
Load Diff This file was deleted.
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
47
44
hooks :
48
45
- id : doc8
49
46
args : [--max-line-length=200]
47
+ stages : [manual]
50
48
51
49
- repo : https://github.com/pycqa/flake8
52
50
rev : 4.0.1
58
56
" flake8-logging-format==0.6.0" ,
59
57
" flake8-implicit-str-concat==0.2.0" ,
60
58
]
59
+ stages : [manual]
61
60
62
61
- repo : https://github.com/pre-commit/mirrors-eslint
63
62
rev : v8.12.0
72
71
files : ^\.github/workflows/
73
72
types : [yaml]
74
73
args : ["--schemafile", "https://json.schemastore.org/github-workflow"]
74
+ stages : [manual]
Original file line number Diff line number Diff line change @@ -59,14 +59,17 @@ You can invoke the pre-commit hook by hand at any time with::
59
59
60
60
which should run any autoformatting on your code
61
61
and tell you about any errors it couldn't fix automatically.
62
- You may also install [ black integration]( https://github.com/psf/black#editor-integration)
62
+ You may also install ` black integration < https://github.com/psf/black#editor-integration >`_
63
63
into your text editor to format code automatically.
64
64
65
65
If you have already committed files before setting up the pre-commit
66
66
hook with ``pre-commit install ``, you can fix everything up using
67
67
``pre-commit run --all-files ``. You need to make the fixing commit
68
68
yourself after that.
69
69
70
+ Some of the hooks only run on CI by default, but you can invoke them by
71
+ running with the ``--hook-stage manual `` argument.
72
+
70
73
Troubleshooting the Installation
71
74
--------------------------------
72
75
You can’t perform that action at this time.
0 commit comments