[UPDATE] copier from template

This commit is contained in:
AaronHForgeFlow
2022-04-22 11:01:21 +02:00
committed by Aaron ForgeFlow
parent e942dc7bcc
commit 4ae550b76e
9 changed files with 154 additions and 79 deletions

View File

@@ -3,10 +3,11 @@ name: pre-commit
on:
pull_request:
branches:
- "15.0"
- "15.0*"
push:
branches:
- "15.0"
- "15.0-ocabot-*"
jobs:
pre-commit:
@@ -14,14 +15,16 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Get python version
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v1
with:
# The pylint-odoo version we use here does not support python 3.10
# https://github.com/OCA/oca-addons-repo-template/issues/80
# We also need to pin to an older version of python for older odoo versions
# where we are not using black > 21. Older black versions won't work with
# Python 3.9.8+, and we can't bump black without reformatting.
python-version: "3.9.7"
- uses: pre-commit/action@v2.0.3
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure --color=always
- name: Check that all files generated by pre-commit are in git
run: |
newfiles="$(git ls-files --others --exclude-from=.gitignore)"