Skip to content

Commit

Permalink
Revert "ci: cache testing contracts (#681)"
Browse files Browse the repository at this point in the history
This reverts commit d1157b4.
  • Loading branch information
PaulRBerg committed Nov 4, 2023
1 parent b69d326 commit b1e5bda
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 52 deletions.
30 changes: 6 additions & 24 deletions .github/workflows/ci-deep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,11 @@ jobs:
- name: "Produce an optimized build with --via-ir"
run: "FOUNDRY_PROFILE=optimized forge build"

- name: "Build the test contracts"
run: "FOUNDRY_PROFILE=test-optimized forge build"

- name: "Cache the build so that it can be re-used by the other jobs"
uses: "actions/cache/save@v3"
with:
path: "out-optimized"
key: "foundry-build-${{ github.sha }}"
path: |
cache
out
out-optimized

- name: "Add build summary"
run: |
Expand All @@ -116,10 +110,7 @@ jobs:
with:
fail-on-cache-miss: true
key: "foundry-build-${{ github.sha }}"
path: |
cache
out
out-optimized
path: "out-optimized"

- name: "Run the unit tests against the optimized build"
run: "FOUNDRY_PROFILE=test-optimized forge test --match-path \"test/unit\""
Expand Down Expand Up @@ -148,10 +139,7 @@ jobs:
with:
fail-on-cache-miss: true
key: "foundry-build-${{ github.sha }}"
path: |
cache
out
out-optimized
path: "out-optimized"

- name: "Run the integration tests against the optimized build"
run: "FOUNDRY_PROFILE=test-optimized forge test --match-path \"test/integration/**/*.sol\""
Expand Down Expand Up @@ -181,10 +169,7 @@ jobs:
with:
fail-on-cache-miss: true
key: "foundry-build-${{ github.sha }}"
path: |
cache
out
out-optimized
path: "out-optimized"

- name: "Run the invariant tests against the optimized build"
run: "FOUNDRY_PROFILE=test-optimized forge test --match-path \"test/invariant/**/*.sol\""
Expand Down Expand Up @@ -213,15 +198,12 @@ jobs:
with:
fail-on-cache-miss: true
key: "foundry-build-${{ github.sha }}"
path: |
cache
out
out-optimized
path: "out-optimized"

- name: "Run the fork tests against the optimized build"
run: "FOUNDRY_PROFILE=test-optimized forge test --match-path \"test/fork/**/*.sol\""

- name: "Add test summary"
run: |
echo "## Fork tests result" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY
36 changes: 8 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,24 +78,19 @@ jobs:

- name: "Generate and prepare the contract artifacts"
run: "./shell/prepare-artifacts.sh"

- name: "Build the test contracts"
run: "FOUNDRY_PROFILE=test-optimized forge build"

- name: "Cache the build so that it can be re-used by the other jobs"
uses: "actions/cache/save@v3"
with:
path: "out-optimized"
key: "foundry-build-${{ github.sha }}"
path: |
cache
out
out-optimized

- name: "Store the contract artifacts in CI"
uses: "actions/upload-artifact@v3"
with:
name: "contract-artifacts"
path: "artifacts"

- name: "Add build summary"
run: |
echo "## Build result" >> $GITHUB_STEP_SUMMARY
Expand All @@ -120,10 +115,7 @@ jobs:
with:
fail-on-cache-miss: true
key: "foundry-build-${{ github.sha }}"
path: |
cache
out
out-optimized
path: "out-optimized"

- name: "Run the unit tests against the optimized build"
run: "FOUNDRY_PROFILE=test-optimized forge test --match-path \"test/unit/**/*.sol\""
Expand Down Expand Up @@ -152,10 +144,7 @@ jobs:
with:
fail-on-cache-miss: true
key: "foundry-build-${{ github.sha }}"
path: |
cache
out
out-optimized
path: "out-optimized"

- name: "Run the integration tests against the optimized build"
run: "FOUNDRY_PROFILE=test-optimized forge test --match-path \"test/integration/**/*.sol\""
Expand All @@ -182,10 +171,7 @@ jobs:
with:
fail-on-cache-miss: true
key: "foundry-build-${{ github.sha }}"
path: |
cache
out
out-optimized
path: "out-optimized"

- name: "Run the utils tests against the optimized build"
run: "FOUNDRY_PROFILE=test-optimized forge test --match-path \"test/utils/**/*.sol\""
Expand All @@ -212,10 +198,7 @@ jobs:
with:
fail-on-cache-miss: true
key: "foundry-build-${{ github.sha }}"
path: |
cache
out
out-optimized
path: "out-optimized"

- name: "Run the invariant tests against the optimized build"
run: "FOUNDRY_PROFILE=test-optimized forge test --match-path \"test/invariant/**/*.sol\""
Expand Down Expand Up @@ -244,10 +227,7 @@ jobs:
with:
fail-on-cache-miss: true
key: "foundry-build-${{ github.sha }}"
path: |
cache
out
out-optimized
path: "out-optimized"

- name: "Generate fuzz seed that changes weekly to avoid burning through RPC allowance"
run: |
Expand Down Expand Up @@ -284,4 +264,4 @@ jobs:
- name: "Add coverage summary"
run: |
echo "## Coverage result" >> $GITHUB_STEP_SUMMARY
echo "✅ Uploaded to Codecov" >> $GITHUB_STEP_SUMMARY
echo "✅ Uploaded to Codecov" >> $GITHUB_STEP_SUMMARY

0 comments on commit b1e5bda

Please sign in to comment.