Skip to content

Commit

Permalink
Added conditions for running unit tests and report in the GitHub action.
Browse files Browse the repository at this point in the history
  • Loading branch information
barnettwilliam committed Feb 20, 2024
1 parent fc6e100 commit 19a3a88
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 19a3a88

Please sign in to comment.