From be5efdb12903f882790aab2e776d6f8b4bc3471d Mon Sep 17 00:00:00 2001 From: Paul Razvan Berg Date: Mon, 15 May 2023 22:57:19 +0300 Subject: [PATCH 1/3] ci: tone down ci some more ci: disable fork tests in coverage job test: remove "fuzz" and "invariant" config for "test-optimized" profile --- .github/workflows/ci.yml | 6 +++++- foundry.toml | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3636a934d..563b0067a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -125,6 +125,8 @@ jobs: test-fuzz: needs: ["lint", "build"] + env: + FOUNDRY_FUZZ_RUNS: "5000" runs-on: "ubuntu-latest" steps: - name: "Check out the repo" @@ -179,6 +181,8 @@ jobs: test-fork: needs: ["lint", "build"] + env: + FOUNDRY_FUZZ_RUNS: "500" runs-on: "ubuntu-latest" steps: - name: "Check out the repo" @@ -221,7 +225,7 @@ jobs: uses: "foundry-rs/foundry-toolchain@v1" - name: "Generate the coverage report" - run: "forge coverage --report lcov" + run: "forge coverage --no-match-path \"test/fork/**/*.sol\" --report lcov" - name: "Upload coverage report to Codecov" uses: "codecov/codecov-action@v3" diff --git a/foundry.toml b/foundry.toml index 552ccf92e..19e683a99 100644 --- a/foundry.toml +++ b/foundry.toml @@ -67,8 +67,6 @@ # Test the optimized contracts without re-compiling them [profile.test-optimized] - fuzz = { runs = 5_000 } - invariant = { depth = 150, runs = 100 } src = "test" [doc] From 80ec01c2b152ab1a60292d55b3ae1f3467b8438b Mon Sep 17 00:00:00 2001 From: Paul Razvan Berg Date: Wed, 17 May 2023 00:41:35 +0300 Subject: [PATCH 2/3] test: exclude invariants in coverage job --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 563b0067a..ead9ef5ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -225,7 +225,7 @@ jobs: uses: "foundry-rs/foundry-toolchain@v1" - name: "Generate the coverage report" - run: "forge coverage --no-match-path \"test/fork/**/*.sol\" --report lcov" + run: "forge coverage --match-path \"test/{fuzz,unit}/**/*.sol\" --report lcov" - name: "Upload coverage report to Codecov" uses: "codecov/codecov-action@v3" From 57d55b5f7d49dc436c75c6a15b2f794540739630 Mon Sep 17 00:00:00 2001 From: Paul Razvan Berg Date: Wed, 17 May 2023 13:00:12 +0300 Subject: [PATCH 3/3] ci: lower fuzz runs for fork tests --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ead9ef5ca..e44528f39 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -182,7 +182,7 @@ jobs: test-fork: needs: ["lint", "build"] env: - FOUNDRY_FUZZ_RUNS: "500" + FOUNDRY_FUZZ_RUNS: "100" runs-on: "ubuntu-latest" steps: - name: "Check out the repo"