diff --git a/.github/workflows/isort.yaml b/.github/workflows/isort.yaml index c1fe352f..ffa16449 100644 --- a/.github/workflows/isort.yaml +++ b/.github/workflows/isort.yaml @@ -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