diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..0e63be0 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,25 @@ +name: Lint + +on: + pull_request: + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-python@v5 + with: + python-version: '3.10' + - name: Lint + run: ./ci/lint.sh diff --git a/ci/lint.sh b/ci/lint.sh new file mode 100755 index 0000000..a50a4f9 --- /dev/null +++ b/ci/lint.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# Runs pre-commit + +set -ue + +pip install pre-commit + +pre-commit run --all-files --show-diff-on-failure