mirror of
https://github.com/brain-tec/account_ebics.git
synced 2025-08-14 06:35:36 +00:00
add github workflow
This commit is contained in:
committed by
Didderen Jérémy
parent
84ba72dab0
commit
e56c3ea1e7
45
.github/workflows/pre-commit.yml
vendored
Normal file
45
.github/workflows/pre-commit.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
name: pre-commit
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- "18.0*"
|
||||
push:
|
||||
branches:
|
||||
- "18.0"
|
||||
|
||||
jobs:
|
||||
pre-commit:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
- name: Get python version
|
||||
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
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
|
||||
env:
|
||||
# Consider valid a PR that changes README fragments but doesn't
|
||||
# change the README.rst file itself. It's not really a problem
|
||||
# because the bot will update it anyway after merge. This way, we
|
||||
# lower the barrier for functional contributors that want to fix the
|
||||
# readme fragments, while still letting developers get README
|
||||
# auto-generated (which also helps functionals when using runboat).
|
||||
# DOCS https://pre-commit.com/#temporarily-disabling-hooks
|
||||
SKIP: oca-gen-addon-readme
|
||||
- name: Check that all files generated by pre-commit are in git
|
||||
run: |
|
||||
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
|
||||
if [ "$newfiles" != "" ] ; then
|
||||
echo "Please check-in the following files:"
|
||||
echo "$newfiles"
|
||||
exit 1
|
||||
fi
|
Reference in New Issue
Block a user