Skip to content

Commit

Permalink
Properly generating coverage report from c8
Browse files Browse the repository at this point in the history
  • Loading branch information
araujoarthur0 committed Jan 30, 2024
1 parent 496d683 commit 32d37fd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .c8rc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"all": true,
"include": ["js/**.{cjs,js,mjs}", "js/classes/**.{cjs,js,mjs}", "src/**.{cjs,js,mjs}", "./main.{cjs,js,mjs}"],
"reporter": ["clover", "json", "lcov", "text"],
"reportsDir": "coverage_c8"
}
7 changes: 4 additions & 3 deletions .github/workflows/Checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,19 @@ jobs:
export DISPLAY=':99'
fi
npm run test:jest
npm run test:electron-mocha-main
npm run test:jest
- name: ' Create COV_REPORT'
run: |
mkdir COV_REPORT
- name: ' Copy jest results'
- name: ' Copy coverage results'
run: |
cp coverage_c8/coverage-final.json COV_REPORT/coverage-final-c8.json
cp coverage_jest/coverage-final.json COV_REPORT/coverage-final-jest.json
- name: ' CodeCov'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: COV_REPORT/coverage-final-jest.json
files: COV_REPORT/coverage-final-c8.json,COV_REPORT/coverage-final-jest.json
name: codecov-${{ matrix.os }}
verbose: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ lib-cov

# Coverage directory used by tools like istanbul
coverage
coverage_c8
coverage_jest
*.lcov

Expand Down

0 comments on commit 32d37fd

Please sign in to comment.