File tree Expand file tree Collapse file tree 1 file changed +20
-43
lines changed
Expand file tree Collapse file tree 1 file changed +20
-43
lines changed Original file line number Diff line number Diff line change @@ -23,49 +23,26 @@ jobs:
2323 with :
2424 fetch-depth : 1
2525 path : " pulpcore"
26-
2726 - uses : " actions/setup-python@v5"
2827 with :
2928 python-version : " 3.11"
30-
31- - name : " Install python dependencies"
32- run : |
33- echo ::group::PYDEPS
34- pip install -r lint_requirements.txt
35- echo ::endgroup::
36-
37- - name : " Lint workflow files"
38- run : |
39- yamllint
40-
41- - name : " Verify bump version config"
42- run : |
43- bump-my-version bump --dry-run release
44- bump-my-version show-bump
45-
46- # run black separately from flake8 to get a diff
47- - name : " Run black"
48- run : |
49- black --version
50- black --check --diff .
51-
52- # Lint code.
53- - name : " Run flake8"
54- run : |
55- flake8
56-
57- - name : " Run extra lint checks"
58- run : |
59- [ ! -x .ci/scripts/extra_linting.sh ] || .ci/scripts/extra_linting.sh
60-
61- - name : " Check for any files unintentionally left out of MANIFEST.in"
62- run : |
63- check-manifest
64-
65- - name : " Verify requirements files"
66- run : |
67- python .ci/scripts/check_requirements.py
68-
69- - name : " Check for common gettext problems"
70- run : |
71- sh .ci/scripts/check_gettext.sh
29+ # cache example from:
30+ # https://pre-commit.com/#github-actions-example
31+ - name : set PY
32+ run : echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
33+ - uses : actions/cache@v5
34+ with :
35+ path : ~/.cache/pre-commit
36+ key : pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
37+ - name : Install pre-commit
38+ run : |
39+ pip install pre-commit
40+ - name : Run pre-commit
41+ shell : " bash"
42+ env :
43+ PY_COLORS : " 1"
44+ FORCE_COLOR : " 1"
45+ PRE_COMMIT_COLOR : " always"
46+ TERM : " xterm-256color"
47+ run : |
48+ pre-commit run --all-files -v
You can’t perform that action at this time.
0 commit comments