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: improve coverage action #73

Merged
merged 9 commits into from
Jul 4, 2024
Merged
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Coverage check on main push
name: Coverage Check

on: [push]

Expand All @@ -7,6 +7,7 @@ env:

jobs:
upload-coverage:
name: Upload Coverage
runs-on: ubuntu-latest

steps:
Expand All @@ -28,7 +29,7 @@ jobs:

- name: Run coverage
shell: bash
run: forge coverage --report summary --report lcov
run: yarn coverage

- name: Setup LCOV
uses: hrishikesh-kadam/setup-lcov@v1
Expand All @@ -43,7 +44,7 @@ jobs:
coverage-files: lcovNew.info

- name: Retrieve previous coverage
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: coverage.info
continue-on-error: true
Expand All @@ -66,7 +67,7 @@ jobs:
mv lcovNew.info coverage.info

- name: Upload the new coverage
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: coverage.info
path: ./coverage.info
path: ./coverage.info
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"scripts": {
"build": "forge build",
"build:optimized": "FOUNDRY_PROFILE=optimized forge build",
"coverage": "forge coverage --match-contract Unit",
"coverage": "forge coverage --report summary --report lcov --match-path 'test/unit/*'",
"deploy:mainnet": "bash -c 'source .env && forge script Deploy -vvvvv --rpc-url $MAINNET_RPC --broadcast --chain mainnet --private-key $MAINNET_DEPLOYER_PK'",
"deploy:sepolia": "bash -c 'source .env && forge script Deploy -vvvvv --rpc-url $SEPOLIA_RPC --broadcast --chain sepolia --private-key $SEPOLIA_DEPLOYER_PK'",
"lint:check": "yarn lint:sol-tests && yarn lint:sol-logic && forge fmt --check",
Expand Down
Loading