Skip to content

Commit

Permalink
ci: add test results to action
Browse files Browse the repository at this point in the history
  • Loading branch information
surmon-china committed Aug 14, 2024
1 parent 3cfa65f commit 48c355a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Test
- name: Test results & coverage
run: pnpm run test:coverage

- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./junit.xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ node_modules
package-lock.json
npm-debug.log


# output
dist

# Test Relative Folders
coverage
junit.xml
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"format": "prettier --write --parser typescript \"src/**/*.ts\"",
"test": "vitest run",
"test:watch": "vitest watch",
"test:coverage": "vitest run --coverage",
"test:coverage": "vitest run --coverage --reporter=junit --outputFile=./junit.xml",
"ci": "npm run lint && npm run test && npm run build",
"release": ". ./scripts/release.sh"
},
Expand Down

0 comments on commit 48c355a

Please sign in to comment.