-
-
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(workflows): upload coverage reports to codecov
Signed-off-by: Lexus Drumgold <[email protected]>
- Loading branch information
1 parent
6482dd9
commit 9814979
Showing
4 changed files
with
128 additions
and
11 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,114 @@ | ||
# CODECOV CONFIGURATION | ||
# https://docs.codecov.com/docs/codecovyml-reference | ||
|
||
--- | ||
codecov: | ||
notify: | ||
after_n_builds: 4 | ||
wait_for_ci: true | ||
require_ci_to_pass: true | ||
|
||
comment: | ||
after_n_builds: 4 | ||
behavior: default | ||
layout: header,diff,files,components,footer | ||
require_base: false | ||
require_changes: false | ||
require_head: true | ||
show_critical_paths: true | ||
|
||
component_management: | ||
default_rules: | ||
statuses: | ||
- type: project | ||
target: 100% | ||
individual_components: | ||
- component_id: internal | ||
name: internal | ||
paths: | ||
- src/internal/ | ||
- component_id: lib | ||
name: lib | ||
paths: | ||
- src/lib/ | ||
- component_id: utils | ||
name: utils | ||
paths: | ||
- src/utils/ | ||
|
||
coverage: | ||
precision: 2 | ||
range: 90..100 | ||
round: nearest | ||
status: | ||
changes: | ||
default: | ||
branches: | ||
- feat/* | ||
- hotfix/* | ||
- main | ||
- release/* | ||
if_ci_failed: error | ||
if_not_found: success | ||
informational: false | ||
only_pulls: false | ||
patch: | ||
default: | ||
branches: | ||
- feat/* | ||
- hotfix/* | ||
- main | ||
- release/* | ||
if_ci_failed: error | ||
if_not_found: success | ||
informational: false | ||
only_pulls: false | ||
target: 100% | ||
threshold: 0% | ||
project: | ||
default: | ||
branches: | ||
- feat/* | ||
- hotfix/* | ||
- main | ||
- release/* | ||
if_ci_failed: error | ||
if_not_found: success | ||
informational: false | ||
only_pulls: false | ||
target: 100% | ||
threshold: 0% | ||
|
||
flags: | ||
node19: | ||
carryforward: false | ||
paths: | ||
- src/ | ||
node18: | ||
carryforward: false | ||
paths: | ||
- src/ | ||
node16: | ||
carryforward: false | ||
paths: | ||
- src/ | ||
node14: | ||
carryforward: false | ||
paths: | ||
- src/ | ||
|
||
github_checks: | ||
annotations: true | ||
|
||
ignore: | ||
- '**/__mocks__/**' | ||
- '**/__tests__/**' | ||
- '**/index.ts' | ||
- src/interfaces/ | ||
- src/pathe.ts | ||
- src/types/ | ||
|
||
profiling: | ||
critical_files_paths: | ||
- src/lib/ | ||
- src/utils/ |
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,12 +3,14 @@ | |
# References: | ||
# | ||
# - https://docs.github.com/actions/automating-builds-and-tests/building-and-testing-nodejs | ||
# - https://docs.github.com/actions/learn-github-actions/contexts | ||
# - https://docs.github.com/actions/using-jobs/using-a-matrix-for-your-jobs | ||
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#pull_request | ||
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#push | ||
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch | ||
# - https://github.com/actions/checkout | ||
# - https://github.com/actions/upload-artifact | ||
# - https://github.com/codecov/codecov-action | ||
# - https://github.com/hmarr/debug-action | ||
|
||
--- | ||
|
@@ -86,20 +88,20 @@ jobs: | |
- id: package-version | ||
name: Get package version | ||
run: echo "result=$(jq .version package.json -r)" >> $GITHUB_OUTPUT | ||
- id: test-archive | ||
name: Archive code coverage results | ||
uses: actions/[email protected] | ||
with: | ||
name: | | ||
${{ format('@{0}-{1}-{2}-coverage', github.repository_owner, github.event.repository.name, steps.package-version.outputs.result) }} | ||
path: | | ||
coverage | ||
!coverage/tmp/ | ||
!coverage/lcov.info | ||
- id: package-archive | ||
name: Archive production artifacts | ||
uses: actions/[email protected] | ||
with: | ||
name: | | ||
${{ format('@{0}-{1}-{2}', github.repository_owner, github.event.repository.name, steps.package-version.outputs.result) }} | ||
path: '*.tgz' | ||
- id: codecov | ||
name: Upload coverage report to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
fail_ci_if_error: true | ||
file: ./coverage/lcov.info | ||
flags: ${{ format('node{0}', matrix.node-version) }} | ||
override_build: ${{ github.run_id }} | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
verbose: true |
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