Skip to content

Commit

Permalink
ci(forge): add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubilmax committed Sep 15, 2023
1 parent 365816b commit 96e801b
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 98 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Formatting

on:
push:
branches:
- main
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

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

- name: Install node
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run Linter
run: yarn lint
35 changes: 15 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
name: test
name: Foundry

on: push
on:
push:
branches:
- main
pull_request:
workflow_dispatch:

env:
FOUNDRY_PROFILE: ci
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
check:
strategy:
fail-fast: true

name: Foundry project
forge-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -19,16 +21,9 @@ jobs:

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

- name: Run Forge build
run: |
forge --version
forge build --sizes
id: build

- name: Run Forge tests
run: |
forge test --match-contract TestDAOSetup -vvv
id: test
run: forge test -vvv
env:
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}
FOUNDRY_FUZZ_RUNS: 64
3 changes: 3 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ fs_permissions = [{ access = "read", path = "config/networks/"}, { access = "rea
mainnet = "https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_KEY}"
tenderly = "https://rpc.tenderly.co/fork/${TENDERLY_FORK_ID}"

[profile.default.fuzz]
runs = 128


# See more config options https://github.com/foundry-rs/foundry/tree/master/config
77 changes: 0 additions & 77 deletions test/LogTest.sol

This file was deleted.

2 changes: 1 addition & 1 deletion test/transactions/helpers/TxTest.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ struct Tx {
uint256 value;
}

abstract contract TxTest is ForkTest /*, DaoTest, RoleModifierTest, MorphoTokenTest*/ {
abstract contract TxTest is ForkTest, DaoTest, RoleModifierTest, MorphoTokenTest {
using stdJson for string;
using ConfigLib for Config;

Expand Down

0 comments on commit 96e801b

Please sign in to comment.