Skip to content

Commit

Permalink
addressing feedback: add workflows and fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mcclurejt committed Aug 7, 2024
1 parent 60fd985 commit c9fc521
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 7 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Code Coverage

on:
push:
pull_request:
merge_group:

jobs:
coverage:
name: coverage
runs-on: ubuntu-latest-16core
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
cache: false

- name: forge version
run: forge --version

- name: Run coverage
run: |
make coverage
sudo apt-get install lcov
lcov --remove lcov.info -o lcov.info 'test/*' 'script/*'
- name: Edit lcov.info
run: |
cat lcov.info | sed '/.*\/test\/.*/,/TN:/d' > tmp.info && mv tmp.info lcov.info
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
path-to-lcov: "./lcov.info"
parallel: true

finish:
needs: coverage
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
10 changes: 6 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: test

on: workflow_dispatch
on:
push:
pull_request:
merge_group:

env:
FOUNDRY_PROFILE: ci
Expand All @@ -24,11 +27,10 @@ jobs:

- name: Run Forge build
run: |
forge --version
forge build --sizes
make build
id: build

- name: Run Forge tests
run: |
forge test -vvv
make test
id: test
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.PHONY: build test

### Build ###

build:
forge build --force --sizes

### Test ###

test:
forge test

coverage:
forge coverage --report lcov
8 changes: 5 additions & 3 deletions contracts/internal/EverlongBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { IEverlongEvents } from "../interfaces/IEverlongEvents.sol";
import { EVERLONG_KIND, EVERLONG_VERSION } from "../libraries/Constants.sol";
import { EverlongERC4626 } from "./EverlongERC4626.sol";

// TODO: Reassess whether centralized configuration management makes sense.
// https://github.com/delvtech/everlong/pull/2#discussion_r1703799747
/// @author DELV
/// @title EverlongBase
/// @notice Base contract for Everlong.
Expand All @@ -21,12 +23,12 @@ abstract contract EverlongBase is EverlongERC4626, IEverlongEvents {
// β”‚ Storage β”‚
// ╰─────────────────────────────────────────────────────────╯

/// Admin ///
// Admin //

/// @dev Address of the contract admin.
address internal _admin;

/// Hyperdrive ///
// Hyperdrive //

/// @dev Address of the Hyperdrive instance wrapped by Everlong.
address public immutable hyperdrive;
Expand All @@ -35,7 +37,7 @@ abstract contract EverlongBase is EverlongERC4626, IEverlongEvents {
// If false, use the Hyperdrive's `vaultSharesToken`.
bool internal immutable _asBase;

/// Positions ///
// Positions //

// TODO: Reassess using a more tailored data structure.
/// @dev Utility data structure to manage the position queue.
Expand Down

0 comments on commit c9fc521

Please sign in to comment.