From a26de981911b40313d0c8cb9dd379501a9238400 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Tue, 7 Dec 2021 15:13:39 -0700 Subject: [PATCH] chore: remove integration tests cargo install will always clone all submodules, which is bad ux https://github.com/rust-lang/cargo/issues/4247\#issuecomment-959912231 --- .github/workflows/integration-tests.yml | 64 ------------------- integration-tests/README.md | 25 -------- integration-tests/add_test.sh | 10 --- integration-tests/test.sh | 31 --------- integration-tests/testdata/drai | 1 - integration-tests/testdata/geb | 1 - integration-tests/testdata/guni-lev | 1 - integration-tests/testdata/lootloose | 1 - integration-tests/testdata/multicall | 1 - .../testdata/solidity-stringutils | 1 - integration-tests/testdata/solmate | 1 - integration-tests/testdata/vaults | 1 - 12 files changed, 138 deletions(-) delete mode 100644 .github/workflows/integration-tests.yml delete mode 100644 integration-tests/README.md delete mode 100755 integration-tests/add_test.sh delete mode 100755 integration-tests/test.sh delete mode 160000 integration-tests/testdata/drai delete mode 160000 integration-tests/testdata/geb delete mode 160000 integration-tests/testdata/guni-lev delete mode 160000 integration-tests/testdata/lootloose delete mode 160000 integration-tests/testdata/multicall delete mode 160000 integration-tests/testdata/solidity-stringutils delete mode 160000 integration-tests/testdata/solmate delete mode 160000 integration-tests/testdata/vaults diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml deleted file mode 100644 index ae78a17b3370..000000000000 --- a/.github/workflows/integration-tests.yml +++ /dev/null @@ -1,64 +0,0 @@ -on: - push: - branches: - - master - pull_request: - -name: e2e tests - -env: - ETH_RPC_URL: https://eth-mainnet.alchemyapi.io/v2/Lc7oIGYeL_QvInzI0Wiu_pOZZDEKBrdf - FORK_BLOCK: 13633752 - -jobs: - tests: - runs-on: ubuntu-latest - strategy: - matrix: - # TODO: Can we automatically generate this matrix via `ls` and `fromJSON`? - # https://docs.github.com/en/actions/learn-github-actions/expressions#fromjson - repo: ["lootloose", "solmate", "vaults", "geb", "solidity-stringutils", "multicall", "guni-lev", "drai"] - - steps: - # clone - - uses: actions/checkout@v2 - with: - submodules: recursive - # some deps require node - - uses: actions/setup-node@v2 - # install rust - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - components: rustfmt, clippy - # ..with caching - - uses: Swatinem/rust-cache@v1 - with: - cache-on-failure: true - - - name: Get git sha - id: vars - run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - - # try to load `forge` from cache - - name: Cache forge - id: cache-forge - uses: actions/cache@v2 - env: - cache-name: cache-forge - with: - path: ./target/debug/forge - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ steps.vars.outputs.sha_short }} - - # if couldn't get, install forge - - name: Install forge - if: steps.cache-forge.outputs.cache-hit != 'true' - run: cargo build --bin forge - - - name: Test ${{ matrix.repo }} - run: ./test.sh ${{ matrix.repo }} - working-directory: - ./integration-tests diff --git a/integration-tests/README.md b/integration-tests/README.md deleted file mode 100644 index ac386ae28ffc..000000000000 --- a/integration-tests/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Benchmarks & Integration Tests - -## Motivation - -This sub-project is used for integration testing -[forge](https://github.com/gakonst/foundry/) with common dapptools repositories, -to ensure that it's compatible with the test cases in them, e.g. usage of HEVM -cheatcodes, proper forking mode integration, fuzzing etc. - -It is also used for getting quick performance benchmarks for Forge. - -## How to run? - -1. Make sure forge & dapptools are installed -1. Run `./test.sh $REPO_NAME`, e.g. `./test.sh LootLoose`. - -## Repositories Included - -See the submodules linked within the [`testdata/`](./testdata) folder. - -## Adding a new repository - -We use git submodules (I know, I know submodules are not great, feel free to -recommend a working alternative), you can add a new one via: -`./add_test.sh $URL` diff --git a/integration-tests/add_test.sh b/integration-tests/add_test.sh deleted file mode 100755 index 527df1d24bcc..000000000000 --- a/integration-tests/add_test.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -# Installs a new dapptools test repository to use - -TESTDATA=testdata -REPO=$1 - -cd $TESTDATA -git submodule add $REPO - -git commit -m "integration-tests: add $REPO" diff --git a/integration-tests/test.sh b/integration-tests/test.sh deleted file mode 100755 index 4cc63e79116e..000000000000 --- a/integration-tests/test.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash -set +x -set -e - - -# TODO: Add logic for running with all -REPO=$1 -TESTDATA=testdata - -ALLOWED_FAILURE_REPOS=("geb" "drai" "guni-lev") -if [[ " ${ALLOWED_FAILURE_REPOS[*]} " =~ " ${REPO} " ]]; then - export FORGE_ALLOW_FAILURE=1 -fi - -DIR=`pwd` - -function runTests() { - cd $TESTDATA/$1 - - # run any installation step if needed - make install || true - - # update the deps - $DIR/../target/debug/forge update - # always have the ffi flag turned on - $DIR/../target/debug/forge test --ffi - - cd - -} - -runTests $REPO diff --git a/integration-tests/testdata/drai b/integration-tests/testdata/drai deleted file mode 160000 index f31ce4fb15bb..000000000000 --- a/integration-tests/testdata/drai +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f31ce4fb15bbb06c94eefea2a3a43384c75b95cf diff --git a/integration-tests/testdata/geb b/integration-tests/testdata/geb deleted file mode 160000 index 50aa78bd61cc..000000000000 --- a/integration-tests/testdata/geb +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 50aa78bd61ccd57fd2d5e9d7ab0f0ce75c231fef diff --git a/integration-tests/testdata/guni-lev b/integration-tests/testdata/guni-lev deleted file mode 160000 index e333f4200538..000000000000 --- a/integration-tests/testdata/guni-lev +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e333f4200538ede70ebe7357608401df94657a65 diff --git a/integration-tests/testdata/lootloose b/integration-tests/testdata/lootloose deleted file mode 160000 index 7b639efe9783..000000000000 --- a/integration-tests/testdata/lootloose +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7b639efe97836155a6a6fc626bf1018d4f8b2495 diff --git a/integration-tests/testdata/multicall b/integration-tests/testdata/multicall deleted file mode 160000 index 1e1b44362640..000000000000 --- a/integration-tests/testdata/multicall +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1e1b44362640820bef92d0ccf5eeee25d9b41474 diff --git a/integration-tests/testdata/solidity-stringutils b/integration-tests/testdata/solidity-stringutils deleted file mode 160000 index 01e955c1d60f..000000000000 --- a/integration-tests/testdata/solidity-stringutils +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 01e955c1d60fe8ac6c7a40f208d3b64758fae40c diff --git a/integration-tests/testdata/solmate b/integration-tests/testdata/solmate deleted file mode 160000 index 938b2d6925e2..000000000000 --- a/integration-tests/testdata/solmate +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 938b2d6925e24de7542bce4b08f3f03988a82245 diff --git a/integration-tests/testdata/vaults b/integration-tests/testdata/vaults deleted file mode 160000 index 3d92dbb11ec1..000000000000 --- a/integration-tests/testdata/vaults +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3d92dbb11ec119c3275dfa5ea6b9bda5dd1fb3aa