-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from ieedan/coverage-action
feat: adds coverage reporting on PR
- Loading branch information
Showing
4 changed files
with
36 additions
and
4 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 |
---|---|---|
|
@@ -29,9 +29,6 @@ jobs: | |
- name: Lint | ||
run: pnpm check | ||
|
||
- name: Lint | ||
run: pnpm test | ||
|
||
- name: Build | ||
run: pnpm build | ||
|
||
|
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: "Test" | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
# Required to checkout the code | ||
contents: read | ||
# Required to put a comment into the pull-request | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: pnpm/action-setup@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
|
||
- name: Install Deps | ||
run: pnpm install | ||
|
||
- name: Test | ||
run: pnpm dlx vitest --coverage.enabled true | ||
|
||
- name: Report Coverage | ||
# Set if: always() to also generate the report if tests are failing | ||
# Only works if you set `reportOnFailure: true` in your vite config as specified above | ||
if: always() | ||
uses: davelosert/vitest-coverage-report-action@v2 |
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