Skip to content

Commit

Permalink
chore: cleanup coverage
Browse files Browse the repository at this point in the history
Rework test coverage in `fullcheck` and apply it in github actions.
  • Loading branch information
kanej committed Jan 25, 2024
1 parent a145e77 commit 8dcd288
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 58 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Build
run: npm run build
- name: Run tests
run: npm run test
run: npm run test:coverage
- name: Run tests in examples
run: npm run test:examples

Expand All @@ -40,7 +40,7 @@ jobs:
- name: Build
run: npm run build
- name: Run tests
run: npm run test
run: npm run test:coverage
- name: Run tests in examples
run: npm run test:examples

Expand All @@ -61,7 +61,7 @@ jobs:
- name: Build
run: npm run build
- name: Run tests
run: npm run test
run: npm run test:coverage
- name: Run tests in examples
run: npm run test:examples

Expand Down
19 changes: 6 additions & 13 deletions packages/core/.nycrc
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
{
"extends": "@istanbuljs/nyc-config-typescript",
"check-coverage": true,
"statements": 35,
"branches": 25,
"functions": 30,
"lines": 35,
"statements": 80,
"branches": 65,
"functions": 75,
"lines": 75,
"all": true,
"include": [
"src/**/*.ts"
],
"reporter": [
"html",
"lcov",
"text",
"text-summary"
],
"include": ["src/**/*.ts"],
"reporter": ["html", "lcov", "text", "text-summary"],
"report-dir": "coverage"
}
21 changes: 7 additions & 14 deletions packages/hardhat-plugin-ethers/.nycrc
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
{
"extends": "@istanbuljs/nyc-config-typescript",
"check-coverage": false,
"statements": 50,
"branches": 30,
"functions": 42,
"lines": 50,
"check-coverage": true,
"statements": 90,
"branches": 85,
"functions": 100,
"lines": 90,
"all": true,
"include": [
"src/**/*.ts"
],
"reporter": [
"html",
"lcov",
"text",
"text-summary"
],
"include": ["src/**/*.ts"],
"reporter": ["html", "lcov", "text", "text-summary"],
"report-dir": "coverage"
}
21 changes: 7 additions & 14 deletions packages/hardhat-plugin-viem/.nycrc
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
{
"extends": "@istanbuljs/nyc-config-typescript",
"check-coverage": false,
"statements": 50,
"branches": 30,
"functions": 42,
"lines": 50,
"check-coverage": true,
"statements": 85,
"branches": 80,
"functions": 100,
"lines": 85,
"all": true,
"include": [
"src/**/*.ts"
],
"reporter": [
"html",
"lcov",
"text",
"text-summary"
],
"include": ["src/**/*.ts"],
"reporter": ["html", "lcov", "text", "text-summary"],
"report-dir": "coverage"
}
21 changes: 7 additions & 14 deletions packages/hardhat-plugin/.nycrc
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
{
"extends": "@istanbuljs/nyc-config-typescript",
"check-coverage": false,
"statements": 50,
"branches": 30,
"functions": 42,
"lines": 50,
"check-coverage": true,
"statements": 70,
"branches": 50,
"functions": 60,
"lines": 70,
"all": true,
"include": [
"src/**/*.ts"
],
"reporter": [
"html",
"lcov",
"text",
"text-summary"
],
"include": ["src/**/*.ts"],
"reporter": ["html", "lcov", "text", "text-summary"],
"report-dir": "coverage"
}
12 changes: 12 additions & 0 deletions packages/ui/.nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "@istanbuljs/nyc-config-typescript",
"check-coverage": false,
"statements": 10,
"branches": 10,
"functions": 10,
"lines": 10,
"all": true,
"include": ["src/**/*.ts", "test/**/*.ts"],
"reporter": ["html", "lcov", "text", "text-summary"],
"report-dir": "coverage"
}
1 change: 1 addition & 0 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"dev": "vite --force",
"build": "tsc && vite build",
"test": "mocha --loader=ts-node/esm --recursive \"test/**/*.ts\"",
"test:coverage": "nyc mocha --loader=ts-node/esm --recursive \"test/**/*.ts\"",
"regenerate-deployment-example": "node ./scripts/generate-example-deployment-json.js",
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
Expand Down

0 comments on commit 8dcd288

Please sign in to comment.