Skip to content

Commit

Permalink
chore: remove network selection from cis and makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
MathisGD committed Oct 20, 2024
1 parent 1b176a2 commit 7daf2a6
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 27 deletions.
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
NETWORK=ethereum-mainnet
ALCHEMY_KEY=
E_MODE_CATEGORY_ID=0
27 changes: 9 additions & 18 deletions .github/workflows/forge-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ name: Forge tests
on:
workflow_call:
inputs:
network:
description: The network on which to run the forge test suite.
required: true
type: string
unit-fuzz-runs:
description: The number of fuzz rounds to perform for each fuzzing unit test.
required: false
Expand Down Expand Up @@ -92,7 +88,7 @@ jobs:
storage-check:
needs: build-no-ir

name: Storage upgrade check (${{ inputs.network }})
name: Storage upgrade check
runs-on: ubuntu-latest

steps:
Expand All @@ -113,7 +109,7 @@ jobs:
test-unit:
needs: build-no-ir

name: Unit tests (${{ inputs.network }})
name: Unit tests
runs-on: ubuntu-latest

steps:
Expand All @@ -126,15 +122,14 @@ jobs:
- name: Run unit tests
run: make test-unit
env:
NETWORK: ${{ inputs.network }}
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}
FOUNDRY_FUZZ_RUNS: ${{ inputs.unit-fuzz-runs }}
FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }}

test-internal:
needs: build-no-ir

name: Internal tests (${{ inputs.network }})
name: Internal tests
runs-on: ubuntu-latest

steps:
Expand All @@ -147,15 +142,14 @@ jobs:
- name: Run internal tests
run: make test-internal
env:
NETWORK: ${{ inputs.network }}
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}
FOUNDRY_FUZZ_RUNS: ${{ inputs.internal-fuzz-runs }}
FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }}

test-integration:
needs: build-no-ir

name: Integration tests (${{ inputs.network }})
name: Integration tests
runs-on: ubuntu-latest

steps:
Expand All @@ -166,9 +160,8 @@ jobs:
- uses: ./.github/actions/install

- name: Run integration tests & create gas report
run: set -o pipefail && make gas-report | tee ${{ inputs.network }}.gasreport.ansi
run: set -o pipefail && make gas-report | tee gasreport.ansi
env:
NETWORK: ${{ inputs.network }}
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}
FOUNDRY_FUZZ_RUNS: ${{ inputs.integration-fuzz-runs }}
FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }}
Expand All @@ -178,12 +171,12 @@ jobs:
id: gas_diff
with:
match: src/Morpho.sol
report: ${{ inputs.network }}.gasreport.ansi
report: gasreport.ansi

test-invariant:
needs: build-no-ir

name: Invariant tests (${{ inputs.network }})
name: Invariant tests
runs-on: ubuntu-latest

steps:
Expand All @@ -196,7 +189,6 @@ jobs:
- name: Run invariant tests
run: make test-invariant
env:
NETWORK: ${{ inputs.network }}
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}
FOUNDRY_INVARIANT_RUNS: ${{ inputs.invariant-runs }}
FOUNDRY_INVARIANT_DEPTH: ${{ inputs.invariant-depth }}
Expand All @@ -210,7 +202,7 @@ jobs:
- test-invariant
if: inputs.coverageThreshold != ''

name: Coverage (${{ inputs.network }})
name: Coverage
runs-on: ubuntu-latest

steps:
Expand All @@ -227,7 +219,6 @@ jobs:
- name: Generate lcov coverage report
run: make coverage
env:
NETWORK: ${{ inputs.network }}
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}

- name: Check coverage threshold
Expand All @@ -237,5 +228,5 @@ jobs:
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: morpho-aave-v3-${{ inputs.network }}
name: morpho-aave-v3
files: lcov.info
2 changes: 0 additions & 2 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,4 @@ jobs:
name: Forge tests

uses: ./.github/workflows/forge-test.yml
with:
network: ethereum-mainnet
secrets: inherit
1 change: 0 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:

uses: ./.github/workflows/forge-test.yml
with:
network: ethereum-mainnet
internal-fuzz-runs: 128
integration-fuzz-runs: 128
invariant-depth: 1024
Expand Down
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
.EXPORT_ALL_VARIABLES:
MAKEFLAGS += --no-print-directory

NETWORK ?= ethereum-mainnet


install:
yarn
foundryup
Expand Down Expand Up @@ -82,7 +79,7 @@ lcov-html:
gas-report:
forge test --match-contract TestIntegration --gas-report

deploy-emode-%:
FOUNDRY_TEST=/dev/null forge script script/$*/EthEModeDeploy.s.sol:EthEModeDeploy --via-ir --broadcast --slow -vvvvv --rpc-url mainnet --ledger
deploy-emode:
FOUNDRY_TEST=/dev/null forge script script/EthEModeDeployScript.sol:EthEModeDeploy --via-ir --broadcast --slow -vvvvv --rpc-url mainnet --ledger

.PHONY: contracts test coverage
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 7daf2a6

Please sign in to comment.