Skip to content

ci: enable pre-commit on the repo #1

ci: enable pre-commit on the repo

ci: enable pre-commit on the repo #1

Workflow file for this run

---
name: pre-commit
on: # yamllint disable-line rule:truthy
pull_request:
push:
branches:
- main
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
id: setup-python
with:
python-version: '3.11'
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: "run pre-commit"
run: |
echo '```console' > $GITHUB_STEP_SUMMARY
pre-commit run --all-files --show-diff-on-failure --color=never >> $GITHUB_STEP_SUMMARY
exit_code=$?
echo '```' >> $GITHUB_STEP_SUMMARY
exit $exit_code