Skip to content

Commit 48c355a

Browse files
committed
ci: add test results to action
1 parent 3cfa65f commit 48c355a

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

.github/workflows/coverage.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,16 @@ jobs:
2222
- name: Install dependencies
2323
run: pnpm install
2424

25-
- name: Test
25+
- name: Test results & coverage
2626
run: pnpm run test:coverage
2727

28+
- name: Upload test results to Codecov
29+
if: ${{ !cancelled() }}
30+
uses: codecov/test-results-action@v1
31+
with:
32+
token: ${{ secrets.CODECOV_TOKEN }}
33+
file: ./junit.xml
34+
2835
- name: Upload coverage to Codecov
2936
uses: codecov/codecov-action@v4
3037
with:

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ node_modules
66
package-lock.json
77
npm-debug.log
88

9+
910
# output
1011
dist
1112

1213
# Test Relative Folders
1314
coverage
15+
junit.xml

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"format": "prettier --write --parser typescript \"src/**/*.ts\"",
4040
"test": "vitest run",
4141
"test:watch": "vitest watch",
42-
"test:coverage": "vitest run --coverage",
42+
"test:coverage": "vitest run --coverage --reporter=junit --outputFile=./junit.xml",
4343
"ci": "npm run lint && npm run test && npm run build",
4444
"release": ". ./scripts/release.sh"
4545
},

0 commit comments

Comments
 (0)