File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4343 run : |
4444 codecov
4545
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/action@v2.0.0
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+
4666 test_docs_and_examples :
4767 name : Test Docs and Examples
4868 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-
41repos :
52 - repo : https://github.com/pre-commit/pre-commit-hooks
63 rev : v4.1.0
4744 hooks :
4845 - id : doc8
4946 args : [--max-line-length=200]
47+ stages : [manual]
5048
5149 - repo : https://github.com/pycqa/flake8
5250 rev : 4.0.1
@@ -58,11 +56,13 @@ repos:
5856 " flake8-logging-format==0.6.0" ,
5957 " flake8-implicit-str-concat==0.2.0" ,
6058 ]
59+ stages : [manual]
6160
6261 - repo : https://github.com/pre-commit/mirrors-eslint
6362 rev : v8.12.0
6463 hooks :
6564 - id : eslint
65+ stages : [manual]
6666
6767 - repo : https://github.com/sirosen/check-jsonschema
6868 rev : 0.14.2
7272 files : ^\.github/workflows/
7373 types : [yaml]
7474 args : ["--schemafile", "https://json.schemastore.org/github-workflow"]
75+ 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::
5959
6060which should run any autoformatting on your code
6161and 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 >`_
6363into your text editor to format code automatically.
6464
6565If you have already committed files before setting up the pre-commit
6666hook with ``pre-commit install ``, you can fix everything up using
6767``pre-commit run --all-files ``. You need to make the fixing commit
6868yourself after that.
6969
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+
7073Troubleshooting the Installation
7174--------------------------------
7275
You can’t perform that action at this time.
0 commit comments