diff options
author | 2023-04-09 20:30:47 +0100 | |
---|---|---|
committer | 2023-04-11 16:28:47 +0100 | |
commit | 2f5ea7068d3682f28ffd181a7f47a65fff8c2205 (patch) | |
tree | ae615d17cfc5f7b9a00f5885180b7412af08060c | |
parent | Replace local flake8 linting config with ruff (diff) |
Replace CI flake8 config with ruff
-rw-r--r-- | .github/workflows/lint-test.yml | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml index 63dc8a581..3ce2ac7a9 100644 --- a/.github/workflows/lint-test.yml +++ b/.github/workflows/lint-test.yml @@ -45,24 +45,12 @@ jobs: pip-licenses --allow-only="$ALLOWED_LICENSE" \ --package $(poetry export -f requirements.txt --without-hashes | sed "s/==.*//g" | tr "\n" " ") - # We will not run `flake8` here, as we will use a separate flake8 - # action. As pre-commit does not support user installs, we set - # PIP_USER=0 to not do a user install. - name: Run pre-commit hooks - run: export PIP_USER=0; SKIP=flake8 pre-commit run --all-files + run: SKIP=ruff pre-commit run --all-files - # 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'" + # Run `ruff` using github formatting to enable automatic inline annotations. + - name: Run ruff + run: "ruff check --format=github ." - name: Run tests and generate coverage report run: pytest -n auto --cov --disable-warnings -q |