Skip to content

Merge branch 'develop' #101

Merge branch 'develop'

Merge branch 'develop' #101

Workflow file for this run

name: pre-commit checks
on: [push, pull_request]
jobs:
pre-commit:
runs-on: ubuntu-latest
container: python:3
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Install pre-commit
run: |
pip install "virtualenv<v20.24.6" && # temporary fix for gitlint
pip install "pre-commit==3.5.0"
- name: Run pre-commit checks
run: |
TMP_MSG_FILE="$(mktemp)" &&
git log -1 --pretty=%B > "${TMP_MSG_FILE}" &&
pre-commit run \
--all-files \
--color=always \
--show-diff-on-failure \
--hook-stage commit &&
pre-commit run \
--all-files \
--color=always \
--show-diff-on-failure \
--hook-stage commit-msg \
--commit-msg-filename "${TMP_MSG_FILE}" &&
pre-commit run \
--all-files \
--color=always \
--show-diff-on-failure \
--hook-stage post-commit ||
{
>&2 echo "pre-commit checks failed. Please consider installing pre-commit";
>&2 echo "hooks in your local Git clone by running \`make git-hooks-install\`.";
exit 1;
}