diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..59ba0e7 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,32 @@ +name: Lint + +on: + push: + pull_request: + workflow_call: + workflow_dispatch: + +concurrency: lint-${{ github.sha }} + +jobs: + lint: + runs-on: ubuntu-latest + env: + PYTHON_VERSION: "3.12" + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python ${{ env.PYTHON_VERSION }} + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: Install dependencies + run: | + python -m venv .venv + source .venv/bin/activate + pip install -r requirements.txt + + - name: Run pre-commit hooks + uses: pre-commit/action@v3.0.1