aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2023-05-05 10:48:58 +0100
committerGravatar Chris Lovering <[email protected]>2023-05-05 10:59:18 +0100
commit3e6359343189ecc4d511525edf95e7ea054f217d (patch)
treec4b6c817d04b966bfbd6d529e27b0b19a935e26e
parenttrigger status embed on CI completed (diff)
Use pre-commit hooks in CI
-rw-r--r--.github/workflows/lint.yaml18
1 files changed, 6 insertions, 12 deletions
diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml
index b5e7fd7..9aeb46a 100644
--- a/.github/workflows/lint.yaml
+++ b/.github/workflows/lint.yaml
@@ -16,18 +16,12 @@ jobs:
with:
python_version: '3.10'
- # Run flake8 and have it format the linting errors in the format of
- # the GitHub Workflow command to register error annotations. This
- # means that our flake8 output is automatically added as an error
- # annotation to both the run result and in the "Files" tab of a
- # pull request.
- #
- # Format used:
- # ::error file={filename},line={line},col={col}::{message}
- - name: Run flake8
- run: "flake8 \
- --format='::error file=%(path)s,line=%(row)d,col=%(col)d::\
- [flake8] %(code)s: %(text)s'"
+ - name: Run pre-commit hooks
+ run: SKIP=ruff pre-commit run --all-files
+
+ # Run `ruff` using github formatting to enable automatic inline annotations.
+ - name: Run ruff
+ run: "ruff check --format=github ."
artifact:
name: Generate & Upload Pull request Artifacts