♻️ Use Native Hex String x"..."
Literals
#70
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 🧪 Venom-based smart contract tests | |
on: [push, pull_request, workflow_dispatch] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
python_version: | |
- 3.12 | |
architecture: | |
- x64 | |
node_version: | |
- 20 | |
echidna: | |
- "--config test/echidna.yaml" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python_version }} | |
architecture: ${{ matrix.architecture }} | |
- name: Install Vyper | |
run: pip install git+https://github.com/vyperlang/vyper@master | |
- name: Install pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: latest | |
run_install: false | |
- name: Get pnpm cache directory path | |
id: pnpm-cache-dir-path | |
run: echo "dir=$(pnpm store path --silent)" >> $GITHUB_OUTPUT | |
- name: Restore pnpm cache | |
uses: actions/cache@v4 | |
id: pnpm-cache | |
with: | |
path: ${{ steps.pnpm-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: ${{ runner.os }}-pnpm-store- | |
- name: Use Node.js ${{ matrix.node_version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node_version }} | |
- name: Install pnpm project with a clean slate | |
run: pnpm install --prefer-offline --frozen-lockfile | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Show the Foundry CI config | |
run: forge config | |
env: | |
FOUNDRY_PROFILE: ci-venom | |
- name: Foundry tests | |
run: forge test | |
env: | |
FOUNDRY_PROFILE: ci-venom | |
- name: Show the Foundry default config | |
run: forge config | |
env: | |
FOUNDRY_PROFILE: default-venom | |
- name: Run snapshot | |
run: NO_COLOR=1 forge snapshot >> $GITHUB_STEP_SUMMARY | |
env: | |
FOUNDRY_PROFILE: default-venom | |
- name: Install Homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
- name: Install Echidna | |
run: brew install echidna | |
- name: Show the Echidna version | |
run: echidna --version | |
- name: Show the Foundry Echidna config | |
run: forge config | |
env: | |
FOUNDRY_PROFILE: echidna-venom | |
- name: Compile the Echidna test contracts | |
run: forge build --build-info | |
env: | |
FOUNDRY_PROFILE: echidna-venom | |
- name: Run Echidna ERC-20 property tests | |
run: echidna test/tokens/echidna/ERC20Properties.sol --contract CryticERC20ExternalHarness ${{ matrix.echidna }} | |
env: | |
FOUNDRY_PROFILE: echidna-venom | |
- name: Run Echidna ERC-721 property tests | |
run: echidna test/tokens/echidna/ERC721Properties.sol --contract CryticERC721ExternalHarness ${{ matrix.echidna }} | |
env: | |
FOUNDRY_PROFILE: echidna-venom |