diff --git a/.github/workflows/anvil_foundry_setup.yml b/.github/workflows/anvil_foundry_setup.yml new file mode 100644 index 000000000..56c4b64e5 --- /dev/null +++ b/.github/workflows/anvil_foundry_setup.yml @@ -0,0 +1,28 @@ +name: Reusable foundry anvil setup + +on: workflow_call + +jobs: + setup_node_foundry: + name: Foundry project + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + cache: "yarn" + + - name: Install project dependencies + run: yarn + + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + with: + version: nightly + +} \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 90b28d003..990e7895c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,26 +10,10 @@ jobs: strategy: fail-fast: true - name: Foundry project + name: Run tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Install Node.js - uses: actions/setup-node@v3 - with: - node-version: 16 - cache: "yarn" - - - name: Install project dependencies - run: yarn - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly + - uses: ./.github/workflows/anvil_foundry_setup.yml - name: Run Forge tests run: |