From 7daf2a6cea5fbe4717e6756e8893f4466bc8910f Mon Sep 17 00:00:00 2001 From: MathisGD Date: Sun, 20 Oct 2024 18:20:24 +0200 Subject: [PATCH] chore: remove network selection from cis and makefile --- .env.example | 1 - .github/workflows/forge-test.yml | 27 +++++++------------ .github/workflows/pull_request.yml | 2 -- .github/workflows/push.yml | 1 - Makefile | 7 ++--- script/{Deploy.s.sol => DeployScript.sol} | 0 ...eDeploy.s.sol => EthEModeDeployScript.sol} | 0 ...{PauseFlags.s.sol => PauseFlagsScript.sol} | 0 ...ship.s.sol => TransferOwnershipScript.sol} | 0 9 files changed, 11 insertions(+), 27 deletions(-) rename script/{Deploy.s.sol => DeployScript.sol} (100%) rename script/{EthEModeDeploy.s.sol => EthEModeDeployScript.sol} (100%) rename script/{PauseFlags.s.sol => PauseFlagsScript.sol} (100%) rename script/{TransferOwnership.s.sol => TransferOwnershipScript.sol} (100%) diff --git a/.env.example b/.env.example index bcf4ca22d..3a6024643 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,2 @@ -NETWORK=ethereum-mainnet ALCHEMY_KEY= E_MODE_CATEGORY_ID=0 diff --git a/.github/workflows/forge-test.yml b/.github/workflows/forge-test.yml index 7a70a415e..c62c2468a 100644 --- a/.github/workflows/forge-test.yml +++ b/.github/workflows/forge-test.yml @@ -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 @@ -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: @@ -113,7 +109,7 @@ jobs: test-unit: needs: build-no-ir - name: Unit tests (${{ inputs.network }}) + name: Unit tests runs-on: ubuntu-latest steps: @@ -126,7 +122,6 @@ 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 }} @@ -134,7 +129,7 @@ jobs: test-internal: needs: build-no-ir - name: Internal tests (${{ inputs.network }}) + name: Internal tests runs-on: ubuntu-latest steps: @@ -147,7 +142,6 @@ 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 }} @@ -155,7 +149,7 @@ jobs: test-integration: needs: build-no-ir - name: Integration tests (${{ inputs.network }}) + name: Integration tests runs-on: ubuntu-latest steps: @@ -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 }} @@ -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: @@ -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 }} @@ -210,7 +202,7 @@ jobs: - test-invariant if: inputs.coverageThreshold != '' - name: Coverage (${{ inputs.network }}) + name: Coverage runs-on: ubuntu-latest steps: @@ -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 @@ -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 diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 2195d89e9..6e4eaafc2 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -23,6 +23,4 @@ jobs: name: Forge tests uses: ./.github/workflows/forge-test.yml - with: - network: ethereum-mainnet secrets: inherit diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 3ea68545d..44b09e087 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -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 diff --git a/Makefile b/Makefile index 4d6ddd9e4..d3ef15fa4 100644 --- a/Makefile +++ b/Makefile @@ -2,9 +2,6 @@ .EXPORT_ALL_VARIABLES: MAKEFLAGS += --no-print-directory -NETWORK ?= ethereum-mainnet - - install: yarn foundryup @@ -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 diff --git a/script/Deploy.s.sol b/script/DeployScript.sol similarity index 100% rename from script/Deploy.s.sol rename to script/DeployScript.sol diff --git a/script/EthEModeDeploy.s.sol b/script/EthEModeDeployScript.sol similarity index 100% rename from script/EthEModeDeploy.s.sol rename to script/EthEModeDeployScript.sol diff --git a/script/PauseFlags.s.sol b/script/PauseFlagsScript.sol similarity index 100% rename from script/PauseFlags.s.sol rename to script/PauseFlagsScript.sol diff --git a/script/TransferOwnership.s.sol b/script/TransferOwnershipScript.sol similarity index 100% rename from script/TransferOwnership.s.sol rename to script/TransferOwnershipScript.sol