From b615a181c5779660038dc5e99d01a14f66f1de77 Mon Sep 17 00:00:00 2001 From: ftsell Date: Wed, 15 Nov 2023 16:07:14 +0100 Subject: [PATCH] add github action to check pre-commit --- .github/workflows/lint.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..2948dca --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,23 @@ +name: lint +on: + push: + branches: [ "**" ] + +jobs: + check-pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: 3.x + - uses: actions/setup-node@v3 + with: + node-version: 18 + - run: npm install -g pnpm + - run: python -m pip install pre-commit + - uses: actions/cache@v3 + with: + path: ~/.cache/pre-commit + key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} + - run: pre-commit run --show-diff-on-failure --color=always --all-files