Skip to content

Commit

Permalink
comment invariant tests (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
sogipec authored May 31, 2024
1 parent 6aecf1a commit 6c72c41
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 66 deletions.
58 changes: 26 additions & 32 deletions .github/workflows/ci-deep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,37 +115,31 @@ jobs:
ETH_NODE_URI_OPTIMISM: ${{ secrets.ETH_NODE_URI_OPTIMISM }}
ETH_NODE_URI_MAINNET: ${{ secrets.ETH_NODE_URI_MAINNET }}

test-invariant:
needs: ["build", "lint"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"

- uses: actions/cache/restore@v3
with:
fail-on-cache-miss: true
path: |
cache-forge
out
node_modules
key: "build-${{ github.sha }}"

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Run Foundry tests
run: yarn test:invariant
env:
FOUNDRY_INVARIANT_RUNS: ${{ github.event.inputs.invariantRuns || '300' }}
FOUNDRY_INVARIANT_DEPTH: ${{ github.event.inputs.invariantDepth || '50' }}
ETH_NODE_URI_POLYGON: ${{ secrets.ETH_NODE_URI_POLYGON }}
ETH_NODE_URI_ARBITRUM: ${{ secrets.ETH_NODE_URI_ARBITRUM }}
ETH_NODE_URI_OPTIMISM: ${{ secrets.ETH_NODE_URI_OPTIMISM }}
ETH_NODE_URI_MAINNET: ${{ secrets.ETH_NODE_URI_MAINNET }}
# test-invariant:
# needs: ["build", "lint"]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: "recursive"

# - uses: actions/cache/restore@v3
# with:
# fail-on-cache-miss: true
# path: |
# cache-forge
# out
# node_modules
# key: "build-${{ github.sha }}"

# - name: Install Foundry
# uses: foundry-rs/foundry-toolchain@v1
# with:
# version: nightly

# - name: Run Foundry tests
# run: yarn test:invariant
# TODO: add env back when uncommenting

test-fuzz:
needs: ["build", "lint"]
Expand Down Expand Up @@ -176,4 +170,4 @@ jobs:
ETH_NODE_URI_POLYGON: ${{ secrets.ETH_NODE_URI_POLYGON }}
ETH_NODE_URI_ARBITRUM: ${{ secrets.ETH_NODE_URI_ARBITRUM }}
ETH_NODE_URI_OPTIMISM: ${{ secrets.ETH_NODE_URI_OPTIMISM }}
ETH_NODE_URI_MAINNET: ${{ secrets.ETH_NODE_URI_MAINNET }}
ETH_NODE_URI_MAINNET: ${{ secrets.ETH_NODE_URI_MAINNET }}
57 changes: 25 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,37 +104,30 @@ jobs:
ETH_NODE_URI_OPTIMISM: ${{ secrets.ETH_NODE_URI_OPTIMISM }}
ETH_NODE_URI_MAINNET: ${{ secrets.ETH_NODE_URI_MAINNET }}

test-invariant:
needs: ["build", "lint"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"

- uses: actions/cache/restore@v3
with:
fail-on-cache-miss: true
path: |
cache-forge
out
node_modules
key: "build-${{ github.sha }}"

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Run Foundry tests
run: yarn test:invariant
env:
FOUNDRY_INVARIANT_RUNS: "8"
FOUNDRY_INVARIANT_DEPTH: "256"
ETH_NODE_URI_POLYGON: ${{ secrets.ETH_NODE_URI_POLYGON }}
ETH_NODE_URI_ARBITRUM: ${{ secrets.ETH_NODE_URI_ARBITRUM }}
ETH_NODE_URI_OPTIMISM: ${{ secrets.ETH_NODE_URI_OPTIMISM }}
ETH_NODE_URI_MAINNET: ${{ secrets.ETH_NODE_URI_MAINNET }}
# test-invariant:
# needs: ["build", "lint"]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: "recursive"

# - uses: actions/cache/restore@v3
# with:
# fail-on-cache-miss: true
# path: |
# cache-forge
# out
# node_modules
# key: "build-${{ github.sha }}"

# - name: Install Foundry
# uses: foundry-rs/foundry-toolchain@v1
# with:
# version: nightly

# - name: Run Foundry tests
# run: yarn test:invariant

test-fuzz:
needs: ["build", "lint"]
Expand Down Expand Up @@ -246,4 +239,4 @@ jobs:
- name: "Add Slither summary"
run: |
echo "## Slither result" >> $GITHUB_STEP_SUMMARY
echo "✅ Uploaded to GitHub code scanning" >> $GITHUB_STEP_SUMMARY
echo "✅ Uploaded to GitHub code scanning" >> $GITHUB_STEP_SUMMARY
2 changes: 1 addition & 1 deletion lib/prb-math
Submodule prb-math updated 163 files

0 comments on commit 6c72c41

Please sign in to comment.