diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml new file mode 100644 index 0000000..764e28c --- /dev/null +++ b/.github/workflows/pre-commit.yaml @@ -0,0 +1,24 @@ +name: pre-commit checks + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +env: + PIP_CACHE_DIR: /tmp/pip-cache-dir + PYTHON_VERSION: "3.12" + +jobs: + pre-commit: + name: "pre-commit" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + - uses: pre-commit/action@v3.0.0 + with: + extra_args: --all-files