From 8c6c7125478fd01a811ec7abb5fa0d87492d4b42 Mon Sep 17 00:00:00 2001 From: Alessio Date: Sat, 19 Apr 2025 16:39:23 -0700 Subject: [PATCH] Try checking for build step negative test result a different way --- .github/workflows/build.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index adc0eb1..1379f0e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -45,17 +45,17 @@ jobs: with: schema-file: 'test_schemas/success.sql' + # This step is expected to fail - name: Run SQLite schema lint action with invalid schema + id: invalid_schema_test uses: ./ with: schema-file: 'test_schemas/failure-no-strict.sql' 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 + if: steps.invalid_schema_test.outcome != 'failure' run: | - if [ $? -eq 0 ]; then - echo "The action succeeded unexpectedly." - exit 1 - else - echo "The action failed as expected." - fi \ No newline at end of file + echo "Expected the invalid schema test to fail, but it succeeded" + exit 1