-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): add Vitest Coverage Action (#1136)
Fixes: #1041
- Loading branch information
1 parent
1cdbdd1
commit 4d32845
Showing
6 changed files
with
37 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ jobs: | |
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
- name: Get Node version from NW.js manifest | ||
- name: Setup Volta | ||
uses: volta-cli/[email protected] | ||
- name: Node.js version | ||
run: node -v | ||
|
@@ -34,3 +34,24 @@ jobs: | |
run: npm run lint | ||
- name: Run tests | ||
run: npm run test | ||
cov: | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
- name: Setup Volta | ||
uses: volta-cli/[email protected] | ||
- name: Node.js version | ||
run: node -v | ||
- name: npm version | ||
run: npm -v | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Enable Coverage | ||
run: npm run test:cov | ||
- name: Report Coverage | ||
if: always() | ||
uses: davelosert/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
.DS_Store | ||
|
||
.idea | ||
coverage | ||
node_modules | ||
|
||
test/fixture/cache | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
import { defineConfig | ||
} from 'vitest/config' | ||
import { defineConfig } from 'vitest/config' | ||
|
||
export default defineConfig | ||
({ | ||
test: { | ||
coverage: { | ||
provider: 'v8', | ||
reporter: ['text'], | ||
}, | ||
}, | ||
}) | ||
export default defineConfig({ | ||
test: { | ||
coverage: { | ||
provider: 'v8', | ||
reporter: ['json-summary'], | ||
reportOnFailure: true, | ||
} | ||
} | ||
}); |