Skip to content

Commit edb4054

Browse files
committed
Fixes to Action workflow - add id: vitest to the “Run unit tests” step so downstream steps can see whether coverage files were generated
1 parent c1902f0 commit edb4054

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/build-and-test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ jobs:
5757
run: npm run lint
5858

5959
- name: Run unit tests (Vitest — coverage with GitHub Actions reporter)
60+
id: vitest
6061
run: |
6162
# Run vitest with coverage. The built-in 'github-actions' reporter
6263
# (configured in vitest.config.ts) will create annotations.
@@ -65,7 +66,7 @@ jobs:
6566
6667
- name: Report Coverage
6768
uses: davelosert/vitest-coverage-report-action@v2.9.0
68-
if: always()
69+
if: ${{ always() && steps.vitest.outcome == 'success' && hashFiles('coverage/coverage-summary.json') != '' }}
6970
with:
7071
json-summary-path: './coverage/coverage-summary.json'
7172
json-final-path: './coverage/coverage-final.json'

e2e-stress-run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env bash
2+
# End-to-end stress test runner script
23
set -uo pipefail
34

45
SUCCESS_FILE="/tmp/e2e-stress-run-success-count"

0 commit comments

Comments
 (0)