diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..7bdc538 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,35 @@ +name: Test CI + +on: + push: + branches: [main] + tags: ["*"] + pull_request: + types: [opened, reopened, synchronize] + +concurrency: + group: ${{github.workflow}}-${{github.ref}} + cancel-in-progress: true + +jobs: + forge: + name: Run Forge Tests (via_ir = true; fuzz_runs = 5000) + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} + token: ${{ secrets.GH_PAT_TOKEN }} + submodules: recursive + + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + with: + version: nightly + + - name: Install forge dependencies + run: forge install + + - name: Run tests + run: FOUNDRY_PROFILE=test forge test -vvv diff --git a/foundry.toml b/foundry.toml index 1f44df6..b0c11be 100644 --- a/foundry.toml +++ b/foundry.toml @@ -8,4 +8,8 @@ remappings = [ 'forge-std/=lib/forge-std/src/', ] +[profile.test] +src = 'test/foundry' +cache_path='test-cache' + # See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options