Skip to content

Commit

Permalink
Fix Isort ci
Browse files Browse the repository at this point in the history
  • Loading branch information
folix-01 committed Sep 25, 2023
1 parent f9972d2 commit 80990b7
Showing 1 changed file with 7 additions and 27 deletions.
34 changes: 7 additions & 27 deletions .github/workflows/isort.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,12 @@
name: Isort
on:
- push
- pull_request
name: Run isort
on: [push]

jobs:
test:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: imports-properly-sorted
uses: ./
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
sortPaths: test/good.py
- name: assert-sorted-imports-return-no-output
run: |
output="${{steps.imports-properly-sorted.outputs.isort-result}}"
if ! [[ $output == "" ]]; then
exit 1
fi
- id: imports-improperly-sorted
uses: ./
with:
sortPaths: test/bad.py
configuration: --diff
- name: assert-improperly-sorted-imports-return-output
run: |
output="${{steps.imports-improperly-sorted.outputs.isort-result}}"
expected_substring="+import datetime"
if ! [[ $output == *"${expected_substring}"* ]]; then
exit 1
fi
python-version: 3.8
- uses: isort/isort-action@master

0 comments on commit 80990b7

Please sign in to comment.