From 3b23f337a608e8ce4a3810a93e7fc56987fe7df5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Eertmans?= Date: Tue, 9 Jan 2024 10:31:05 +0100 Subject: [PATCH] chore(ci): add pre-commit workflow --- .github/workflows/lint.yml | 21 +++++++++++++++++++++ .pre-commit-config.yaml | 1 + 2 files changed, 22 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 00000000..725b0b40 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,21 @@ +# Lint code and (optionally) apply fixes +name: Lint code + +on: + pull_request: + push: + branches: [main] + workflow_dispatch: + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.11' + - uses: pre-commit/action@v3.0.0 + - uses: pre-commit-ci/lite-action@v1.0.1 + if: always() + diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8c57d4ea..9f47269c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,3 +37,4 @@ repos: ci: autofix_commit_msg: 'chore(fmt): auto fixes from pre-commit hooks' autoupdate_commit_msg: 'chore(deps): update pre-commit hooks' + skip: [pylint] # because deps are too heavy