From f452ff7f4ece6fb99983896de6d55e666947d724 Mon Sep 17 00:00:00 2001 From: Kanad Gupta Date: Wed, 4 Dec 2024 16:09:32 -0600 Subject: [PATCH] chore: smol cleanup --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2e8125f5..4e2775ebe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,21 +88,21 @@ jobs: with: rdme: openapi validate "oas-examples-repo/3.1/json/petstore.json" - - name: Run `openapi validate` on a file that will fail + - name: Run `openapi validate` on an invalid file uses: ./rdme-repo/ id: openapi-validate-fail continue-on-error: true with: rdme: openapi validate rdme-repo/__tests__/__fixtures__/invalid-oas.json - - name: Assert previous step failed - if: ${{ steps.openapi-validate-fail.outcome == 'success' }} - run: echo "::error::Expected previous workflow step to fail" && exit 1 - - - name: Echo previous step failed + - name: Assert that previous validation step failed if: ${{ steps.openapi-validate-fail.outcome == 'failure' }} run: echo "The previous step failed as expected." + - name: Throw error if previous validation step did not fail + if: ${{ steps.openapi-validate-fail.outcome == 'success' }} + run: echo "::error::Expected previous workflow step to fail" && exit 1 + # Docs: https://rdme-test.readme.io - name: Run `openapi` command uses: ./rdme-repo/