Skip to content

Commit

Permalink
always() && is not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
akaihola committed Jul 29, 2024
1 parent 7d247bd commit 40cced0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/test-working-directory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
revision: HEAD

- name: Fail if no exit code 2 even though test.py was not found
if: always() && steps.no-work-dir.outputs.exitcode != '2'
if: steps.no-work-dir.outputs.exitcode != '2'
run: |
echo "::error::Darker should have failed with exit code 2"
echo "::error::It exited with ${{ steps.no-work-dir.outputs.exitcode }}"
Expand All @@ -54,14 +54,14 @@ jobs:
revision: HEAD

- name: Fail if no exit code 1 even though reformatting is needed
if: always() && steps.right-workdir.outputs.exitcode != '1'
if: steps.right-workdir.outputs.exitcode != '1'
run: |
echo "::error::Darker should have exited with code 1"
echo "::error::It exited with ${{ steps.right-workdir.outputs.exitcode }}"
exit 1
- name: Verify diff output
if: always() && !contains(steps.right-workdir.outputs.stdout, '@@')
if: ( ! contains(steps.right-workdir.outputs.stdout, '@@') )
run: |
echo "::error::Darker did not output a diff as expected"
exit 1
Expand All @@ -79,7 +79,7 @@ jobs:
revision: HEAD

- name: Check that Darker failed with a non-existing working-directory
if: always() && steps.wrong-work-dir.outputs.exitcode != '21'
if: steps.wrong-work-dir.outputs.exitcode != '21'
run: |
echo "::error::Darker should have exited with code 21"
echo "::error::It exited with ${{ steps.wrong-work-dir.outputs.exitcode }}"
Expand All @@ -97,7 +97,7 @@ jobs:
src: non_existent_file.py

- name: Check file not found error code
if: always() && steps.file-not-found.outputs.exitcode != '2'
if: steps.file-not-found.outputs.exitcode != '2'
run: |
echo "::error::Darker should have exited with code 2"
echo "::error::It exited with ${{ steps.file-not-found.outputs.exitcode }}"
Expand All @@ -113,7 +113,7 @@ jobs:
options: --invalid-option

- name: Check invalid arguments error code
if: always() && steps.invalid-arguments.outputs.exitcode != '3'
if: steps.invalid-arguments.outputs.exitcode != '3'
run: |
echo "::error::Darker should have exited with code 3"
echo "::error::It exited with ${{ steps.invalid-arguments.outputs.exitcode }}"
Expand All @@ -130,7 +130,7 @@ jobs:
options: --flynt

- name: Check missing dependencies error code
if: always() && steps.missing-deps.outputs.exitcode != '4'
if: steps.missing-deps.outputs.exitcode != '4'
run: |
echo "::error::Darker should have exited with code 4"
echo "::error::It exited with ${{ steps.missing-deps.outputs.exitcode }}"
Expand Down

0 comments on commit 40cced0

Please sign in to comment.