Skip to content

setup ci

setup ci #10

Workflow file for this run

name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
project:
- repo: "OpenZeppelin/openzeppelin-contracts"
dir: "openzeppelin-contracts"
submodule: "lib/erc4626-tests"
cmd: "forge test --mc ERC4626StdTest"
steps:
- name: Checkout current repository
uses: actions/checkout@v4
with:
path: erc4626-tests
- name: Checkout external project
uses: actions/checkout@v4
with:
repository: ${{ matrix.project.repo }}
path: ${{ matrix.project.dir }}
- name: Replace submodule with current commit
working-directory: ${{ matrix.project.dir }}
run: |
git submodule update --recursive --init
cd ${{ matrix.project.submodule }}
# Add local remote pointing to current erc4626-tests repository
git remote add local ${{ github.workspace }}/erc4626-tests
git remote -v show
git branch --all
git remote update
git checkout local/main
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Run tests
working-directory: ${{ matrix.project.dir }}
run: |
${{ matrix.project.test_command }}