|
3 | 3 | #  GitHub Action: Test |
4 | 4 |
|
5 | 5 | <div align="center"> |
6 | | - <img src="https://opengraph.githubassets.com/37509d7404c261847696d98c678948e95b072f3217fcfba735757b21fad5b5d7/hoverkraft-tech/ci-github-nodejs" width="60px" align="center" alt="Test" /> |
| 6 | + <img src="https://opengraph.githubassets.com/9583af06e0716e1d6cf0f13319f864b9b10858c23c40a2073ed4ee97dc6dee98/hoverkraft-tech/ci-github-nodejs" width="60px" align="center" alt="Test" /> |
7 | 7 | </div> |
8 | 8 |
|
9 | 9 | --- |
@@ -46,6 +46,9 @@ Action to test Node.js projects with support for coverage reporting and pull req |
46 | 46 | # This should be a script defined in your `package.json`. |
47 | 47 | # The command should generate coverage report files in a standard format (Cobertura XML, lcov, etc.). |
48 | 48 | # |
| 49 | + # Vitest: `vitest run --reporter=default --reporter=junit --outputFile=junit.xml --coverage.enabled --coverage.reporter=lcov --coverage.reporter=text` |
| 50 | + # Jest: `jest --ci --reporters=default --reporters=jest-junit --coverage` |
| 51 | + # |
49 | 52 | # Default: `test:ci` |
50 | 53 | command: test:ci |
51 | 54 |
|
@@ -86,6 +89,9 @@ Action to test Node.js projects with support for coverage reporting and pull req |
86 | 89 | | **`command`** | npm/pnpm/Yarn script command to run for testing. | **false** | `test:ci` | |
87 | 90 | | | This should be a script defined in your `package.json`. | | | |
88 | 91 | | | The command should generate coverage report files in a standard format (Cobertura XML, lcov, etc.). | | | |
| 92 | +| | | | | |
| 93 | +| | Vitest: `vitest run --reporter=default --reporter=junit --outputFile=junit.xml --coverage.enabled --coverage.reporter=lcov --coverage.reporter=text` | | | |
| 94 | +| | Jest: `jest --ci --reporters=default --reporters=jest-junit --coverage` | | | |
89 | 95 | | **`coverage`** | Code coverage reporter to use. Supported values: | **false** | `github` | |
90 | 96 | | | - `github`: Parse coverage reports via [parse-ci-reports](https://hoverkraft-tech/ci-github-common/actions/parse-ci-reports) action, with GitHub summaries/PR comments | | | |
91 | 97 | | | - `codecov`: Upload coverage to Codecov | | | |
|
0 commit comments