diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 1d1323e..b178e49 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -22,6 +22,24 @@ jobs: - name: Run tests run: python3 -m pytest + precommit_hooks: + runs-on: ubuntu-latest + strategy: + matrix: + hook: + - name: "Check EOF format" + args: "end-of-file-fixer --all-files" + - name: "Check trailing whitespace" + args: "trailing-whitespace --all-files" + - name: "Check line ending format" + args: "mixed-line-ending --fix=lf --all-files" + steps: + - uses: actions/checkout@v3 + + - name: ${{ matrix.hook.name }} + uses: pre-commit/action@v3.0.1 + with: + extra_args: ${{ matrix.hook.args }} lint: name: lint runs-on: ubuntu-latest