From 687290b3415f5020f8299ef2f5806c7a79f02763 Mon Sep 17 00:00:00 2001 From: Bence Haromi Date: Mon, 18 Sep 2023 13:29:53 +0100 Subject: [PATCH] ci(ci.yml): foundry testing added EVM-216 --- .github/workflows/ci.yml | 45 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0290378c3..2f9445a050 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,7 +66,7 @@ jobs: ethereum/cache ethereum/typechain - test: + test-hardhat: needs: [build, lint] runs-on: ubuntu-latest @@ -103,3 +103,46 @@ jobs: - name: Run tests run: yarn test --no-compile + + test-foundry: + needs: [build, lint] + runs-on: ubuntu-latest + + defaults: + run: + working-directory: ethereum + + steps: + - name: Checkout the repository + uses: actions/checkout@v3 + with: + submodules: "recursive" + + - name: "Install Foundry" + uses: "foundry-rs/foundry-toolchain@v1" + + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: 16.15.1 + cache: yarn + cache-dependency-path: ethereum/yarn.lock + + - name: Install yarn + run: npm install -g yarn + + - name: Install dependencies + run: yarn install + + - name: Restore artifacts cache + uses: actions/cache/restore@v3 + with: + fail-on-cache-miss: true + key: artifacts-${{ github.sha }} + path: | + ethereum/artifacts + ethereum/cache + ethereum/typechain + + - name: Run tests + run: forge test