Skip to content

Commit 6a09334

Browse files
committed
try this
1 parent c9368ca commit 6a09334

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/test_failure.yml

+9-6
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ jobs:
1313
with:
1414
schema-url: https://raw.githubusercontent.com/thomasmost/gha-valjean/main/schema/example.schema.json
1515
target-dir: samples_bad
16-
- name: Check that validation failed
17-
if: failure() && steps.test_failure.outcome == 'failure'
18-
run: exit 0
19-
- name: Check that validation did not succeed
20-
if: success()
21-
run: exit 1
16+
continue-on-error: true # Allow the job to continue even if this step fails
17+
18+
- name: Check if the previous step failed and pass the job if it did
19+
if: failure() || steps.test_failure.outcome == 'failure'
20+
run: echo "Expected failure occurred, job will pass."
21+
22+
- name: Fail the job if the previous step succeeded
23+
if: success() || steps.test_failure.outcome == 'success'
24+
run: exit 1 # This will fail the job

0 commit comments

Comments
 (0)