Skip to content

Commit

Permalink
feat: add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
sujithsomraaj committed Aug 22, 2023
1 parent 5083ba6 commit 702d2a9
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 42 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: ci

on: [push]

jobs:
tests:
name: Foundry Testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

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

- name: Install Dependencies
run: forge install

- name: Run Size Check
run: forge build --sizes
env:
ETH_FORK_URL: ${{ secrets.ETH_FORK_URL }}
BSC_FORK_URL: ${{ secrets.BSC_FORK_URL }}
POLYGON_FORK_URL: ${{ secrets.POLYGON_FORK_URL }}
ARB_FORK_URL: ${{ secrets.ARB_FORK_URL }}

- name: Run Tests
run: forge test -vvv
env:
ETH_FORK_URL: ${{ secrets.ETH_FORK_URL }}
BSC_FORK_URL: ${{ secrets.BSC_FORK_URL }}
POLYGON_FORK_URL: ${{ secrets.POLYGON_FORK_URL }}
ARB_FORK_URL: ${{ secrets.ARB_FORK_URL }}

- name: Run Coverage
run: forge coverage
env:
ETH_FORK_URL: ${{ secrets.ETH_FORK_URL }}
BSC_FORK_URL: ${{ secrets.BSC_FORK_URL }}
POLYGON_FORK_URL: ${{ secrets.POLYGON_FORK_URL }}
ARB_FORK_URL: ${{ secrets.ARB_FORK_URL }}

slither:
name: Slither Run
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive

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

- name: Build the contracts
run: forge build --build-info

- name: Run Slither
uses: crytic/slither-action@v0.3.0
with:
ignore-compile: true


34 changes: 0 additions & 34 deletions .github/workflows/test.yml

This file was deleted.

7 changes: 0 additions & 7 deletions foundry.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
[profile.default]
src = "src"
out = "out"
libs = ["lib"]
solc = "0.8.19"

optimizer = true
runs = 100
viaIR = true

# See more config options https://github.com/foundry-rs/foundry/tree/master/config

0 comments on commit 702d2a9

Please sign in to comment.