-
Notifications
You must be signed in to change notification settings - Fork 343
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove gas report fix: gas report fix: gas report refactor: continuous fuzzing refactor: cleanup feat: gas reporting feat: intense continuous fuzzing refactor: rename workflow files refactor: renaming refactor: ci refactor: renaming refactor: ci feat: add `FOUNDRY_PROFILE=lite` to ci refactor: small `foundry.toml` cleanup
- Loading branch information
1 parent
8fb585a
commit fce16bc
Showing
11 changed files
with
231 additions
and
149 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Certora Prover | ||
name: Check Certora | ||
|
||
on: | ||
push: | ||
|
6 changes: 5 additions & 1 deletion
6
.github/workflows/commitlint.yml → .github/workflows/commit-linting.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
types: [opened, reopened] | ||
|
||
env: | ||
FOUNDRY_PROFILE: intense | ||
RPC_MAINNET: ${{ secrets.RPC_MAINNET }} | ||
RPC_HOLESKY: ${{ secrets.RPC_HOLESKY }} | ||
CHAIN_ID: ${{ secrets.CHAIN_ID }} | ||
|
||
jobs: | ||
run-tests: | ||
name: Continous Fuzzing | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Checkout Layr-Labs/eigenlayer-contracts | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Node.js | ||
run: | | ||
curl -fsSL https://deb.nodesource.com/setup_21.x | sudo -E bash - | ||
sudo apt-get install -y nodejs | ||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Run Forge build | ||
run: | | ||
forge --version | ||
forge build --sizes | ||
id: build | ||
|
||
- name: Run unit and integration tests | ||
run: forge test |
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
42 changes: 19 additions & 23 deletions
42
.github/workflows/coverage.yml → .github/workflows/forge-coverage.yml
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 |
---|---|---|
@@ -1,76 +1,72 @@ | ||
name: Run Coverage | ||
name: CI | ||
|
||
on: | ||
push: | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
prepare: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
run-coverage: | ||
needs: prepare | ||
name: Check Coverage | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Load issue number | ||
uses: actions/github-script@v6 | ||
id: get_issue_number | ||
with: | ||
script: | | ||
let issue_number; | ||
// Attempt to find a pull request associated with the commit | ||
const pullRequests = await github.rest.repos.listPullRequestsAssociatedWithCommit({ | ||
commit_sha: context.sha, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
}); | ||
if (pullRequests.data.length > 0) { | ||
issue_number = pullRequests.data[0].number; | ||
return pullRequests.data[0].number; | ||
} else { | ||
throw new Error('No associated issue or pull request found.'); | ||
throw new Error('No associated pull request found.'); | ||
} | ||
return issue_number; | ||
result-encoding: string | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Install lcov | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install lcov | ||
id: lcov | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Run coverage | ||
run: forge coverage --report lcov | ||
run: FOUNDRY_PROFILE=ci forge coverage --report lcov | ||
env: | ||
RPC_MAINNET: ${{ secrets.RPC_MAINNET }} | ||
RPC_HOLESKY: ${{ secrets.RPC_HOLESKY }} | ||
|
||
- name: Prune coverage report | ||
run: lcov --remove ./lcov.info -o ./lcov.info.pruned 'src/test/*' 'script/*' '*Storage.sol' --ignore-errors inconsistent | ||
|
||
- name: Generate reports | ||
run: genhtml -o report ./lcov.info.pruned | ||
- name: Upload coverage results (s3 link here) | ||
|
||
- name: Upload coverage results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: code-coverage-report | ||
path: report/* | ||
- name: View Coverage (text here) | ||
|
||
- name: View and log coverage | ||
id: print_coverage | ||
run: | | ||
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) | ||
echo "comment_contents<<$EOF" >> $GITHUB_OUTPUT | ||
echo "$(lcov --list ./lcov.info.pruned --ignore-errors inconsistent)" >> $GITHUB_OUTPUT | ||
echo "$EOF" >> $GITHUB_OUTPUT | ||
- name: Log Coverage Report | ||
run: echo "${{ steps.print_coverage.outputs.comment_contents }}" | ||
run: echo "${{ steps.print_coverage.outputs.comment_contents }}" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
types: [opened, reopened] | ||
|
||
env: | ||
FOUNDRY_PROFILE: ci | ||
RPC_MAINNET: ${{ secrets.RPC_MAINNET }} | ||
RPC_HOLESKY: ${{ secrets.RPC_HOLESKY }} | ||
CHAIN_ID: ${{ secrets.CHAIN_ID }} | ||
|
||
jobs: | ||
run-tests: | ||
name: Check Forge Tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Checkout Layr-Labs/eigenlayer-contracts | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Node.js | ||
run: | | ||
curl -fsSL https://deb.nodesource.com/setup_21.x | sudo -E bash - | ||
sudo apt-get install -y nodejs | ||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Run Forge build | ||
run: | | ||
forge --version | ||
forge build --sizes | ||
id: build | ||
|
||
- name: Run unit and integration tests | ||
run: forge test | ||
|
||
- name: Run integration mainnet fork tests | ||
run: forge test --match-contract Integration | ||
env: | ||
FOUNDRY_PROFILE: "forktest" |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.