test: property and invariant tests (#61)

- define properties and invariants
- implement a Medusa-based fuzzing campaign

---------

Co-authored-by: drgorillamd <83670532+drgorillamd@users.noreply.github.com>
Co-authored-by: moebius <0xmoebius@protonmail.com>
This commit is contained in:
Simon Something /DrGoNoGo
2025-02-14 13:12:37 +01:00
committed by GitHub
parent c0d80bcf6f
commit 646e5508ce
27 changed files with 2066 additions and 57 deletions

View File

@@ -99,37 +99,6 @@ jobs:
- name: Run tests
run: yarn test:integration
halmos-tests:
name: Symbolic execution tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "yarn"
- name: Setup .npmrc file
run: |
echo "@defi-wonderland:registry=https://npm.pkg.github.com" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.PKG_REGISTRY_TOKEN }}" >> .npmrc
- name: Install dependencies
run: yarn --frozen-lockfile --network-concurrency 1
- name: Precompile
run: yarn build
- name: Run tests
run: yarn test:symbolic
lint:
name: Lint Commit Messages
runs-on: ubuntu-latest
@@ -162,6 +131,29 @@ jobs:
- run: yarn lint:check
medusa-tests:
name: Medusa Test
runs-on: ubuntu-latest
container: ghcr.io/trailofbits/eth-security-toolbox/ci:nightly-20241223
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup .npmrc file
run: |
echo "@defi-wonderland:registry=https://npm.pkg.github.com" > .npmrc
echo "//npm.pkg.github.com/:_authToken=${{ secrets.PKG_REGISTRY_TOKEN }}" >> .npmrc
working-directory: .
- name: Install dependencies
run: yarn --frozen-lockfile --network-concurrency 1
- name: Run Medusa
run: medusa fuzz --test-limit 200000
upload-coverage:
name: Upload Coverage
runs-on: ubuntu-latest