Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: codecov config #361

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,13 @@ jobs:
id: testWithCache
run: yarn turbo lint test build --cache-dir=.turbo
continue-on-error: true


- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
flags: UnitTests
token: ${{ secrets.CODECOV_TOKEN }}

- name: Try to do again without cache
if: failure() && steps.testWithCache.outcome == 'failure'
run: yarn turbo lint test build --force --cache-dir=.turbo

2 changes: 1 addition & 1 deletion adapters/aptos-wallet-adapter-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts",
"test": "jest",
"test": "jest --coverage=true --coverage-reporters=text",
"lint": "eslint src --ext .ts"
},
"dependencies": {
Expand Down
1 change: 1 addition & 0 deletions adapters/rainbowkit-connector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
},
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts",
"test": "jest --coverage=true --coverage-reporters=text",
"lint": "eslint src --ext .ts"
},
"dependencies": {
Expand Down
51 changes: 51 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
coverage:
status:
project:
default:
target: 80%
threshold: 1%
patch:
default:
target: auto
threshold: 5%

component_management:
default_rules: # default rules that will be inherited by all components
statuses:
- type: project
target: 80%
- type: patch
target: 80%

individual_components:
- component_id: 'blocto-sdk'
paths:
- /packages/blocto-sdk/src/
- component_id: 'dappauth'
paths:
- /packages/dappauth/src/
- component_id: 'aptos-wallet-adapter-plugin'
paths:
- /adapters/aptos-wallet-adapter-plugin/src/
- component_id: 'connectkit-connector'
paths:
- /adapters/connectkit-connector/src/
- component_id: 'rainbowkit-connector'
paths:
- /adapters/rainbowkit-connector/src/
- component_id: 'wagmi-connector'
paths:
- /adapters/wagmi-connector/src/
- component_id: 'web3-react-connector'
paths:
- /adapters/web3-react-connector/src/
- component_id: 'web3modal-connector'
paths:
- /adapters/web3modal-connector/src/

comment:
layout: 'header, diff, flags, components'
behavior: 'default'
require_changes: false
require_base: no
require_head: no
2 changes: 1 addition & 1 deletion packages/blocto-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"build": "NODE_ENV=production rollup -c",
"clean": "rimraf dist",
"lint": "eslint --ext .js,.ts src/",
"test": "jest",
"test": "jest --coverage=true --coverage-reporters=text",
"prepublishOnly": "npm-run-all clean build",
"rollup-watch": "NODE_ENV=development rollup -c rollup.config.dev.js --watch",
"serve": "live-server --port=7777 --https=dev-cert/index.js dev",
Expand Down
Loading