Try checking for build step negative test result a different way
This commit is contained in:
parent
e5f708931a
commit
8c6c712547
10
.github/workflows/build.yaml
vendored
10
.github/workflows/build.yaml
vendored
@ -45,17 +45,17 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
schema-file: 'test_schemas/success.sql'
|
schema-file: 'test_schemas/success.sql'
|
||||||
|
|
||||||
|
# This step is expected to fail
|
||||||
- name: Run SQLite schema lint action with invalid schema
|
- name: Run SQLite schema lint action with invalid schema
|
||||||
|
id: invalid_schema_test
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
schema-file: 'test_schemas/failure-no-strict.sql'
|
schema-file: 'test_schemas/failure-no-strict.sql'
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
|
# This step should check that the previous step failed. If it was successful, this step should fail
|
||||||
- name: Check for expected failure
|
- name: Check for expected failure
|
||||||
|
if: steps.invalid_schema_test.outcome != 'failure'
|
||||||
run: |
|
run: |
|
||||||
if [ $? -eq 0 ]; then
|
echo "Expected the invalid schema test to fail, but it succeeded"
|
||||||
echo "The action succeeded unexpectedly."
|
|
||||||
exit 1
|
exit 1
|
||||||
else
|
|
||||||
echo "The action failed as expected."
|
|
||||||
fi
|
|
Loading…
x
Reference in New Issue
Block a user