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