Skip to content

Commit

Permalink
chore(tests): codecov integration
Browse files Browse the repository at this point in the history
- https://codecov.io

Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
  • Loading branch information
unicornware committed Feb 3, 2023
1 parent 691b3bb commit 85ef913
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 0 deletions.
112 changes: 112 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# 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,flags,components,tree,footer
require_base: false
require_changes: false
require_head: true
show_carryforward_flags: true
show_critical_paths: true

component_management:
default_rules:
statuses:
- type: project
target: 100%
individual_components:
- component_id: internal
name: internal
paths:
- src/internal/*.ts
- component_id: utils
name: utils
paths:
- src/utils/*.ts

coverage:
precision: 2
range: 90..100
round: nearest
status:
changes:
default:
branches:
- dependabot/*
- feat/*
- hotfix/*
- main
- release/*
if_ci_failed: error
if_not_found: success
informational: false
only_pulls: false
patch:
default:
branches:
- dependabot/*
- feat/*
- hotfix/*
- main
- release/*
if_ci_failed: error
if_not_found: success
informational: false
only_pulls: false
target: 100%
threshold: 0%
project:
default:
branches:
- dependabot/*
- 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/types/

profiling:
critical_files_paths:
- src/utils/*.ts
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# tsconfig-utils

[![npm](https://img.shields.io/npm/v/@flex-development/tsconfig-utils.svg)](https://npmjs.com/package/@flex-development/tsconfig-utils)
[![codecov](https://codecov.io/gh/flex-development/tsconfig-utils/branch/main/graph/badge.svg?token=c7gDtTlaw3)](https://codecov.io/gh/flex-development/tsconfig-utils)
[![module type: esm](https://img.shields.io/badge/module%20type-esm-brightgreen)](https://github.com/voxpelli/badges-cjs-esm)
[![license](https://img.shields.io/github/license/flex-development/tsconfig-utils.svg)](LICENSE.md)
[![conventional commits](https://img.shields.io/badge/-conventional%20commits-fe5196?logo=conventional-commits&logoColor=ffffff)](https://conventionalcommits.org/)
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
"clean:modules": "trash ./.yarn/{cache,*.gz} ./node_modules",
"clean:pack": "trash ./*.tgz",
"clean:test": "yarn clean:coverage && trash ./__tests__/report.json",
"codecov": "yarn test:cov && yarn test:cov:upload",
"codecov:validate": "cat .codecov.yml | curl --data-binary @- https://codecov.io/validate",
"fix:cg": "yarn fix:format && yarn fix:lint",
"fix:dedupe": "yarn dedupe --strategy=highest",
"fix:format": "prettier --cache --write .",
Expand All @@ -59,6 +61,7 @@
"test": "vitest run",
"test:cov": "yarn clean:coverage; yarn test --coverage",
"test:cov:serve": "serve -l 5432 ./coverage/lcov-report",
"test:cov:upload": "./codecov -t $CODECOV_TOKEN -f ./coverage/lcov.info",
"test:watch": "vitest",
"typecheck": "vitest typecheck --run",
"typecheck:watch": "vitest typecheck"
Expand Down

0 comments on commit 85ef913

Please sign in to comment.