-
-
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.
ci: create code coverage files using nyc and codecov (#22)
* ci: create code coverage files using nyc and codecov * ci: delete paths in test.yml
- Loading branch information
1 parent
c636eb8
commit 1bb6210
Showing
5 changed files
with
1,558 additions
and
59 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: codecov | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
paths: ['src/**', 'tests/**'] | ||
|
||
jobs: | ||
codecov: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set up checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: npm | ||
|
||
- name: Set up cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Set up node_modules | ||
run: npm ci | ||
|
||
- name: Coverage | ||
run: npm run coverage | ||
|
||
- name: Upload results to codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,7 @@ | |
|
||
# production | ||
/build | ||
|
||
# tests | ||
/.nyc_output | ||
/coverage |
Oops, something went wrong.