File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77jobs :
88 pre-commit :
9- runs-on : ubuntu-latest
9+ runs-on : ubuntu-22.04
1010 steps :
11- - uses : actions/checkout@v2
12- - uses : actions/setup-python@v4
11+ - uses : actions/checkout@v4
12+ - uses : actions/setup-python@v5
1313 with :
14- # The pylint-odoo version we use here does not support python 3.10
15- # https://github.com/OCA/oca-addons-repo-template/issues/80
16- python-version : " 3.9"
17- - uses : pre-commit/action@v2.0.0
14+ python-version : " 3.11"
15+ - name : Get python version
16+ run : echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
17+ - uses : actions/cache@v4
18+ with :
19+ path : ~/.cache/pre-commit
20+ key : pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
21+ - name : Install pre-commit
22+ run : pip install pre-commit
23+ - name : Run pre-commit
24+ run : pre-commit run --all-files --show-diff-on-failure --color=always
25+ - name : Check that all files generated by pre-commit are in git
26+ run : |
27+ newfiles="$(git ls-files --others --exclude-from=.gitignore)"
28+ if [ "$newfiles" != "" ] ; then
29+ echo "Please check-in the following files:"
30+ echo "$newfiles"
31+ exit 1
32+ fi
You can’t perform that action at this time.
0 commit comments