From e3eee3aea5984fc5b388eae37a0251f4afd0b10c Mon Sep 17 00:00:00 2001 From: Will Constable Date: Fri, 23 Feb 2024 15:56:19 -0800 Subject: [PATCH] Re-add the linter This reverts commit 82f61444ac56a8dc1acb79a652811e4381fb86e1. --- .github/workflows/lint.yaml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/lint.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 000000000..03d6d5555 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,39 @@ +name: Lint + +on: + pull_request: + +concurrency: + group: lint-${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_number || github.ref }} + cancel-in-progress: true + +defaults: + run: + shell: bash -l -eo pipefail {0} + +jobs: + lint: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.11'] + steps: + - name: Check out repo + uses: actions/checkout@v3 + - name: Setup python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Update pip + run: python -m pip install --upgrade pip + - name: Install lint utilities + run: | + python -m pip install pre-commit + pre-commit install-hooks + - id: file_changes + uses: trilom/file-changes-action@v1.2.4 + with: + prNumber: ${{ github.event.number }} + output: ' ' + - name: Lint modified files + run: pre-commit run --files ${{ steps.file_changes.outputs.files }}