Skip to content

Setup foundry for local development #624

Setup foundry for local development

Setup foundry for local development #624

Workflow file for this run

name: Contracts - Test Suite
on:
push:
branches:
- main
tags:
- "*"
pull_request:
types: [opened, synchronize]
jobs:
contracts-test-suite:
runs-on: ubuntu-latest
env:
FORCE_COLOR: true
REPORT_GAS: true
steps:
- uses: actions/checkout@v2
- uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- uses: actions/[email protected]
with:
node-version: "20"
- uses: actions/setup-python@v2
with:
python-version: "3.x"
- run: yarn install
- run: yarn workspace @discovery-dao/contracts compile
- run: yarn workspace @discovery-dao/contracts lint
- run: yarn workspace @discovery-dao/contracts test
- name: Run Slither
uses: crytic/[email protected]
continue-on-error: true
id: slither
with:
ignore-compile: true
target: packages/contracts