From 19a3a889c9335c932888c5eb63a2c458ad1cbf63 Mon Sep 17 00:00:00 2001 From: Will Barnett Date: Tue, 20 Feb 2024 17:13:45 +0000 Subject: [PATCH] Added conditions for running unit tests and report in the GitHub action. --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92c531e..63c07d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,15 +40,18 @@ jobs: fail-on-error: true - name: Build the education platform + id: build-platform if: success() || failure() run: npm run build --workspaces - name: Run the unit tests + id: run-unit-tests + if: success() || failure() && steps.build-platform.outcome == 'success' run: npm test --workspaces - name: Create test report uses: dorny/test-reporter@v1 - if: success() || failure() + if: success() || failure() && steps.run-unit-tests.outcome == 'success' with: name: Unit Test Results path: platform/reports/TESTS*.xml