Skip to content

Commit

Permalink
chore: coverage ci and README
Browse files Browse the repository at this point in the history
  • Loading branch information
0xtekgrinder committed Feb 12, 2024
1 parent b12e818 commit f365f2a
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,45 @@ jobs:
run: |
echo "## Foundry Unit tests result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
coverage:
needs: ["build", "lint"]
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"

- name: "Install Foundry"
uses: "foundry-rs/foundry-toolchain@v1"

- name: "Install lcov"
run: "sudo apt-get install lcov"

- uses: actions/cache/restore@v3
with:
fail-on-cache-miss: true
path: |
cache-forge
out
cache-hh
artifacts
typechain
node_modules
key: "build-${{ github.sha }}"

- name: "Generate the coverage report using the unit and the integration tests"
run: "yarn ci:coverage"
env:
ETH_NODE_URI_OPTIMISM: ${{ secrets.ETH_NODE_URI_OPTIMISM }}

- name: "Upload coverage report to Codecov"
uses: "codecov/codecov-action@v3"
with:
files: "./lcov.info"
token: ${{ secrets.CODECOV_TOKEN }}

- name: "Add coverage summary"
run: |
echo "## Coverage result" >> $GITHUB_STEP_SUMMARY
echo "✅ Uploaded to Codecov" >> $GITHUB_STEP_SUMMARY
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# <img src="logo.svg" alt="Merkl Contracts" height="40px"> Merkl Contracts

[![CI](https://github.com/AngleProtocol/merkl-contracts/actions/workflows/ci.yml/badge.svg)](https://github.com/AngleProtocol/merkl-contracts/actions)
[![Coverage](https://codecov.io/gh/AngleProtocol/merkl-contracts/branch/main/graph/badge.svg)](https://codecov.io/gh/AngleProtocol/merkl-contracts)

This repository contains the smart contracts of the Merkl product developed by Angle.

Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
"version": "1.0.0",
"description": "",
"scripts": {
"ci:coverage": "forge coverage --ir-minimum --report lcov && yarn lcov:clean",
"lcov:clean": "lcov --remove lcov.info -o lcov.info 'test/**' 'scripts/**' 'contracts/mock/**' 'contracts/deprecated/**' 'contracts/external/**'",
"lcov:generate-html": "genhtml lcov.info --output=coverage",
"deploy": "hardhat deploy --tags distributionCreator --network",
"etherscan": "hardhat etherscan-verify --network",
"foundry:compile": "forge build --optimize --optimizer-runs 1000",
"foundry:coverage": "forge coverage --report lcov && forge coverage",
"foundry:coverage": "forge coverage --ir-minimum --report lcov && yarn lcov:clean && yarn lcov:generate-html",
"foundry:deploy": "forge script --broadcast --verify -vvvv",
"foundry:gas": "forge test --gas-report",
"foundry:run": "docker run -it --rm -v $(pwd):/app -w /app ghcr.io/foundry-rs/foundry sh",
Expand Down

0 comments on commit f365f2a

Please sign in to comment.