GitHub Action to run pre-commit

This commit is contained in:
Christian Clauss 2021-09-07 07:46:21 +02:00 committed by GitHub
parent cfd2a9968e
commit a8f7e85348
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

16
.github/workflows/pre-commit.yml vendored Normal file
View file

@ -0,0 +1,16 @@
# https://pre-commit.com
# This GitHub Action assumes that the repo contains a valid .pre-commit-config.yaml file.
name: pre-commit
on: [pull_request, push]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- run: pip install pre-commit poetry
- run: pre-commit --version
- run: pre-commit install
- run: pre-commit run --all-files