Skip to content

Commit

Permalink
Merge pull request #116 from elliot-100/fix-115-ci-isort-github-actio…
Browse files Browse the repository at this point in the history
…n-doesnt-seem-to-report-expected-issues

Partial fix: CI: isort GitHub action doesn't report expected issues
  • Loading branch information
elliot-100 authored May 23, 2024
2 parents ab0694b + 50b80cf commit 5a09879
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,18 @@ jobs:
- name: Install project
run: poetry install
- name: Lint imports with isort
# By default: exit with error if imports are not properly sorted
uses: isort/isort-action@master
with:
configuration: profile = black
# Use command line due to bugs/docs gaps with official `isort/isort-action`.
# Exit with error if the code is not properly formatted; show diffs;
# `black` compatibility.
# Only target files in `spond` and `test` due to unreliable behaviour on files in
# root directory.
# Diffs reported for these files should be the same as fixes made by running
# `isort .` in the root project folder, which picks up config from
# `pyproject.toml`.
run: |
source $VENV
isort spond --check-only --diff --profile black
isort tests --check-only --diff --profile black
- name: Lint with black
# by default: exit with error if the code is not properly formatted; show diffs
uses: psf/black@stable
Expand Down

0 comments on commit 5a09879

Please sign in to comment.