Skip to content

Commit bc7855d

Browse files
committed
jest -> vitest
1 parent 3e85c16 commit bc7855d

6 files changed

Lines changed: 639 additions & 68 deletions

File tree

.github/workflows/test.yaml

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,16 @@ jobs:
3434
run: npm install
3535

3636
- name: Run tests
37-
run: npm run test:ci
38-
env:
39-
NODE_OPTIONS: '--experimental-vm-modules'
40-
41-
- name: Publish Test Results
42-
uses: EnricoMi/publish-unit-test-result-action@v2.18.0
43-
if: always()
44-
with:
45-
files: ./coverage/test-report/test-report.xml
46-
47-
- name: Publish Code Coverage
48-
uses: irongut/CodeCoverageSummary@v1.3.0
49-
with:
50-
filename: coverage/cobertura-coverage.xml
51-
badge: true
52-
format: markdown
53-
output: both
54-
55-
- name: Add Coverage PR Comment
56-
uses: marocchino/sticky-pull-request-comment@v2
57-
if: github.event_name == 'pull_request'
37+
run: npm run test:coverage
38+
39+
- name: Report Coverage
40+
if: (!cancelled())
41+
uses: davelosert/vitest-coverage-report-action@v2
42+
43+
- name: Publish JUnit Test Report
44+
if: (!cancelled()) && (success() || failure())
45+
uses: mikepenz/action-junit-report@v5
5846
with:
59-
recreate: true
60-
path: code-coverage-results.md
47+
report_paths: reports/junit.xml
48+
check_name: 'Vitest JUnit'
6149

62-
- name: Write to job Summary
63-
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ tmp
33
dist
44
.vscode
55
coverage
6+
reports
67

78
/lib
89
output/

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"build": "tsc -p tsconfig.build.json",
1717
"watch": "tsc -w -p tsconfig.build.json",
1818
"prepare": "npm run build",
19-
"clean": "git clean -xdf dist coverage",
20-
"clean:all": "git clean -xdf dist coverage node_modules",
19+
"clean": "git clean -xdf dist coverage reports",
20+
"clean:all": "git clean -xdf dist coverage reports node_modules",
2121
"publish:dry": "npm publish --dry-run",
2222
"test": "vitest",
2323
"test:coverage": "vitest run --coverage"

0 commit comments

Comments
 (0)