From a8f7e85348fcec2d66ebc77720963551d553011b Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 7 Sep 2021 07:46:21 +0200 Subject: [PATCH] GitHub Action to run pre-commit --- .github/workflows/pre-commit.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/pre-commit.yml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 00000000..db9510f3 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -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