generated from bgd-labs/bgd-forge-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from bgd-labs/feat/coverage
feat: code coverage
- Loading branch information
Showing
25 changed files
with
3,139 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ on: | |
jobs: | ||
test: | ||
uses: bgd-labs/github-workflows/.github/workflows/foundry-test.yml@main | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Simple workflow for deploying static content to GitHub Pages | ||
name: Deploy static content to Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["main"] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Single deploy job since we're just deploying | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v5 | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
# Upload only report folder | ||
path: "./report" | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
genhtml ./lcov.info.p -o report --branch-coverage |
217 changes: 217 additions & 0 deletions
217
report/contracts/src/contracts/RiskSteward.sol.func-c.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,217 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
|
||
<html lang="en"> | ||
|
||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<title>LCOV - lcov.info.p - contracts/src/contracts/RiskSteward.sol - functions</title> | ||
<link rel="stylesheet" type="text/css" href="../../../gcov.css"> | ||
</head> | ||
|
||
<body> | ||
|
||
<table width="100%" border=0 cellspacing=0 cellpadding=0> | ||
<tr><td class="title">LCOV - code coverage report</td></tr> | ||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr> | ||
|
||
<tr> | ||
<td width="100%"> | ||
<table cellpadding=1 border=0 width="100%"> | ||
<tr> | ||
<td width="10%" class="headerItem">Current view:</td> | ||
<td width="10%" class="headerValue"><a href="../../../index.html">top level</a> - <a href="index.html">contracts/src/contracts</a> - RiskSteward.sol<span style="font-size: 80%;"> (<a href="RiskSteward.sol.gcov.html">source</a> / functions)</span></td> | ||
<td width="5%"></td> | ||
<td width="5%"></td> | ||
<td width="5%" class="headerCovTableHead">Coverage</td> | ||
<td width="5%" class="headerCovTableHead" title="Covered + Uncovered code">Total</td> | ||
<td width="5%" class="headerCovTableHead" title="Exercised code only">Hit</td> | ||
</tr> | ||
<tr> | ||
<td class="headerItem">Test:</td> | ||
<td class="headerValue">lcov.info.p</td> | ||
<td></td> | ||
<td class="headerItem">Lines:</td> | ||
<td class="headerCovTableEntryHi">100.0 %</td> | ||
<td class="headerCovTableEntry">94</td> | ||
<td class="headerCovTableEntry">94</td> | ||
</tr> | ||
<tr> | ||
<td class="headerItem">Test Date:</td> | ||
<td class="headerValue">2024-05-07 20:11:46</td> | ||
<td></td> | ||
<td class="headerItem">Functions:</td> | ||
<td class="headerCovTableEntryHi">100.0 %</td> | ||
<td class="headerCovTableEntry">19</td> | ||
<td class="headerCovTableEntry">19</td> | ||
</tr> | ||
<tr> | ||
<td></td> | ||
<td></td> | ||
<td></td> | ||
<td class="headerItem">Branches:</td> | ||
<td class="headerCovTableEntryHi">-</td> | ||
<td class="headerCovTableEntry">0</td> | ||
<td class="headerCovTableEntry">0</td> | ||
</tr> | ||
<tr><td><img src="../../../glass.png" width=3 height=3 alt=""></td></tr> | ||
</table> | ||
</td> | ||
</tr> | ||
|
||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr> | ||
</table> | ||
|
||
<center> | ||
<table cellpadding=1 cellspacing=1 border=0> | ||
<tr><td><br></td></tr> | ||
<tr> | ||
<td class="tableHead">Function Name <span title="Click to sort table by function name" class="tableHeadSort"><a href="RiskSteward.sol.func.html"><img src="../../../updown.png" width=10 height=14 alt="Sort by function name" title="Click to sort table by function name" border=0></a></span></td> | ||
|
||
<td class="tableHead">Hit count <span title="Click to sort table by function hit count" class="tableHeadSort"><img src="../../../glass.png" width=10 height=14 alt="Sort by function hit count" title="Click to sort table by function hit count" border=0></span></td> | ||
|
||
|
||
</tr> | ||
<tr> | ||
<td class="coverFn"><a href="RiskSteward.sol.gcov.html#L94">RiskSteward.getRiskConfig</a></td> | ||
|
||
<td class="coverFnHi">2</td> | ||
|
||
|
||
</tr> | ||
<tr> | ||
<td class="coverFn"><a href="RiskSteward.sol.gcov.html#L99">RiskSteward.isAssetRestricted</a></td> | ||
|
||
<td class="coverFnHi">2</td> | ||
|
||
|
||
</tr> | ||
<tr> | ||
<td class="coverFn"><a href="RiskSteward.sol.gcov.html#L354">RiskSteward._updateCollateralSide</a></td> | ||
|
||
<td class="coverFnHi">3</td> | ||
|
||
|
||
</tr> | ||
<tr> | ||
<td class="coverFn"><a href="RiskSteward.sol.gcov.html#L324">RiskSteward._updateRates</a></td> | ||
|
||
<td class="coverFnHi">3</td> | ||
|
||
|
||
</tr> | ||
<tr> | ||
<td class="coverFn"><a href="RiskSteward.sol.gcov.html#L302">RiskSteward._updateCaps</a></td> | ||
|
||
<td class="coverFnHi">4</td> | ||
|
||
|
||
</tr> | ||
<tr> | ||
<td class="coverFn"><a href="RiskSteward.sol.gcov.html#L388">RiskSteward._getInterestRatesForAsset</a></td> | ||
|
||
<td class="coverFnHi">6</td> | ||
|
||
|
||
</tr> | ||
<tr> | ||
<td class="coverFn"><a href="RiskSteward.sol.gcov.html#L83">RiskSteward.getTimelock</a></td> | ||
|
||
<td class="coverFnHi">6</td> | ||
|
||
|
||
</tr> | ||
<tr> | ||
<td class="coverFn"><a href="RiskSteward.sol.gcov.html#L151">RiskSteward._validateRatesUpdate</a></td> | ||
|
||
<td class="coverFnHi">7</td> | ||
|
||
|
||
</tr> | ||
<tr> | ||
<td class="coverFn"><a href="RiskSteward.sol.gcov.html#L50">RiskSteward.</a></td> | ||
|
||
<td class="coverFnHi">8</td> | ||
|
||
|
||
</tr> | ||
<tr> | ||
<td class="coverFn"><a href="RiskSteward.sol.gcov.html#L113">RiskSteward._validateCapsUpdate</a></td> | ||
|
||
<td class="coverFnHi">10</td> | ||
|
||
|
||
</tr> | ||
<tr> | ||
<td class="coverFn"><a href="RiskSteward.sol.gcov.html#L208">RiskSteward._validateCollateralsUpdate</a></td> | ||
|
||
<td class="coverFnHi">10</td> | ||
|
||
|
||
</tr> | ||
<tr> | ||
<td class="coverFn"><a href="RiskSteward.sol.gcov.html#L421">RiskSteward._updateWithinAllowedRange</a></td> | ||
|
||
<td class="coverFnHi">34</td> | ||
|
||
|
||
</tr> | ||
<tr> | ||
<td class="coverFn"><a href="RiskSteward.sol.gcov.html#L282">RiskSteward._validateParamUpdate</a></td> | ||
|
||
<td class="coverFnHi">45</td> | ||
|
||
|
||
</tr> | ||
<tr> | ||
<td class="coverFn"><a href="RiskSteward.sol.gcov.html#L88">RiskSteward.setRiskConfig</a></td> | ||
|
||
<td class="coverFnHi">259</td> | ||
|
||
|
||
</tr> | ||
<tr> | ||
<td class="coverFn"><a href="RiskSteward.sol.gcov.html#L104">RiskSteward.setAssetRestricted</a></td> | ||
|
||
<td class="coverFnHi">261</td> | ||
|
||
|
||
</tr> | ||
<tr> | ||
<td class="coverFn"><a href="RiskSteward.sol.gcov.html#L69">RiskSteward.updateRates</a></td> | ||
|
||
<td class="coverFnHi">263</td> | ||
|
||
|
||
</tr> | ||
<tr> | ||
<td class="coverFn"><a href="RiskSteward.sol.gcov.html#L39">RiskSteward.onlyRiskCouncil</a></td> | ||
|
||
<td class="coverFnHi">266</td> | ||
|
||
|
||
</tr> | ||
<tr> | ||
<td class="coverFn"><a href="RiskSteward.sol.gcov.html#L63">RiskSteward.updateCaps</a></td> | ||
|
||
<td class="coverFnHi">266</td> | ||
|
||
|
||
</tr> | ||
<tr> | ||
<td class="coverFn"><a href="RiskSteward.sol.gcov.html#L75">RiskSteward.updateCollateralSide</a></td> | ||
|
||
<td class="coverFnHi">266</td> | ||
|
||
|
||
</tr> | ||
</table> | ||
<br> | ||
</center> | ||
<table width="100%" border=0 cellspacing=0 cellpadding=0> | ||
<tr><td class="ruler"><img src="../../../glass.png" width=3 height=3 alt=""></td></tr> | ||
<tr><td class="versionInfo">Generated by: <a href="https://github.com//linux-test-project/lcov" target="_parent">LCOV version 2.0-1</a></td></tr> | ||
</table> | ||
<br> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.