Skip to content

Commit fce9730

Browse files
committed
chore: upload test results to codecov (junit reporter)
1 parent 80c66d8 commit fce9730

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.github/workflows/tests.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,22 @@ jobs:
4747
- name: Run Unit Tests
4848
run: 'pnpm ci:test:units'
4949

50-
- name: Upload to Codecov
51-
uses: codecov/codecov-action@v5
50+
- name: Upload Test Results
51+
uses: codecov/test-results-action@v1
5252
with:
53+
fail_ci_if_error: true
5354
os: ${{ matrix.os }}
54-
files: ./coverage/lcov.info
55+
files: ./coverage/junit.xml
56+
flags: unittests, ${{ matrix.os }}
57+
token: ${{ secrets.CODECOV_TOKEN }}
58+
verbose: true
59+
60+
- name: Upload to Codecov
61+
uses: codecov/codecov-action@v5.0.6
62+
with:
5563
fail_ci_if_error: true
64+
os: ${{ matrix.os }}
65+
files: ./coverage/lcov.info, ./coverage/junit.xml
5666
flags: unittests, ${{ matrix.os }}
5767
token: ${{ secrets.CODECOV_TOKEN }}
68+
verbose: true

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
"prepublishOnly": "publint",
4545
"lint": "eslint src/**/*",
4646
"test": "vitest --coverage",
47-
"ci:test:units": "vitest run plugin --coverage",
47+
"ci:test:units": "vitest run plugin --coverage --reporter=junit --outputFile=./coverage/junit.xml",
4848
"ci:test:integrations": "vitest run vite",
4949
"ci:version": "changeset version && pnpm install --no-frozen-lockfile",
5050
"ci:publish": "changeset publish && pnpm install"

0 commit comments

Comments
 (0)