mirror of
https://github.com/lens-protocol/core.git
synced 2026-01-09 14:18:04 -05:00
devops: added lcov merging for hardhat and forge coverage
This commit is contained in:
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -20,7 +20,7 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Compile code and run test coverage
|
||||
run: npm run coverage
|
||||
run: npm run hardhat:coverage
|
||||
|
||||
foundry:
|
||||
strategy:
|
||||
@@ -50,3 +50,5 @@ jobs:
|
||||
cp .env.example .env
|
||||
source .env
|
||||
forge test -vvv
|
||||
- name: Run Full Merged Coverage
|
||||
run: npm run coverage
|
||||
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -17,11 +17,12 @@ build/
|
||||
/tasks/collect.ts
|
||||
/tasks/test-module.ts
|
||||
|
||||
/coverage
|
||||
/coverage*
|
||||
coverage.json
|
||||
.coverage_artifacts
|
||||
.coverage_cache
|
||||
.coverage_contracts
|
||||
lcov*
|
||||
|
||||
addresses.json
|
||||
|
||||
@@ -35,3 +36,5 @@ out/
|
||||
/broadcast/**/dry-run/
|
||||
|
||||
contracts/core/modules/follow/SecretCodeFollowModule.sol
|
||||
|
||||
.DS_Store
|
||||
|
||||
@@ -10,7 +10,10 @@
|
||||
"size": "npm run compile && SKIP_LOAD=true hardhat size-contracts",
|
||||
"full-deploy-local": "hardhat full-deploy --network localhost",
|
||||
"full-deploy-mumbai": "hardhat full-deploy --network mumbai",
|
||||
"coverage": "npm run compile && hardhat coverage --temp temp-artifacts --testfiles test/emptyrun.coverage.ts && hardhat coverage --temp temp-artifacts --testfiles '!test/emptyrun.coverage.ts'",
|
||||
"hardhat:coverage": "npm run compile && hardhat coverage --temp temp-artifacts --testfiles test/emptyrun.coverage.ts && hardhat coverage --temp temp-artifacts --testfiles '!test/emptyrun.coverage.ts'",
|
||||
"foundry:coverage": "forge coverage --report lcov",
|
||||
"merge:coverage": "bash scripts/mergeCoverage.sh",
|
||||
"coverage": "npm run hardhat:coverage && npm run foundry:coverage && npm run merge:coverage",
|
||||
"run-env": "npm i && tail -f /dev/null",
|
||||
"hardhat": "hardhat",
|
||||
"hardhat:kovan": "hardhat --network kovan",
|
||||
|
||||
3
scripts/mergeCoverage.sh
Normal file
3
scripts/mergeCoverage.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
lcov -a lcov.info -a coverage/lcov.info -o lcov_merged.info
|
||||
lcov -r lcov_merged.info 'test/*' '*contracts/core/modules/collect/*' '*contracts/core/modules/deprecated/*' '*contracts/core/modules/follow/*' '*contracts/core/modules/reference/*' '*contracts/core/modules/*Base.sol' '*contracts/mocks/*' -o lcov_merged_clean.info
|
||||
genhtml lcov_merged_clean.info --rc lcov_branch_coverage=1 -o coverage_merged -s
|
||||
Reference in New Issue
Block a user