-
Notifications
You must be signed in to change notification settings - Fork 9
85 lines (80 loc) · 3 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
tests:
name: Forge Testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: foundry-rs/foundry-toolchain@v1
with:
cache: false
version: nightly
- uses: cardinalby/export-env-action@v2
with:
envFile: 'constants.env'
- name: dependencies
run: forge install
- name: tests
run: forge test -vvv
env:
# make fuzzing semi-deterministic to avoid noisy gas cost estimation
# due to non-deterministic fuzzing (but still use pseudo-random fuzzing seeds)
FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }}
BSC_RPC_URL: ${{ secrets.BSC_RPC_URL }}
ARBITRUM_RPC_URL: ${{ secrets.ARBITRUM_RPC_URL }}
OPTIMISM_RPC_URL: ${{ secrets.OPTIMISM_RPC_URL }}
ETHEREUM_RPC_URL: ${{ secrets.ETHEREUM_RPC_URL }}
POLYGON_RPC_URL: ${{ secrets.POLYGON_RPC_URL }}
AVALANCHE_RPC_URL: ${{ secrets.AVALANCHE_RPC_URL }}
FANTOM_RPC_URL: ${{ secrets.FANTOM_RPC_URL }}
# snapshot:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: recursive
# - uses: foundry-rs/foundry-toolchain@v1
# with:
# version: nightly
# - uses: cardinalby/export-env-action@v2
# with:
# envFile: 'constants.env'
# - name: dependencies
# run: forge install
# - name: check contract sizes
# run: forge build --sizes
# - name: check gas snapshots
# run: forge snapshot --check
# env:
# make fuzzing semi-deterministic to avoid noisy gas cost estimation
# due to non-deterministic fuzzing (but still use pseudo-random fuzzing seeds)
# FOUNDRY_FUZZ_SEED: 0x${{ github.event.pull_request.base.sha || github.sha }}
# BSC_RPC_URL: ${{ secrets.BSC_RPC_URL }}
# ARBITRUM_RPC_URL: ${{ secrets.ARBITRUM_RPC_URL }}
# OPTIMISM_RPC_URL: ${{ secrets.OPTIMISM_RPC_URL }}
# ETHEREUM_RPC_URL: ${{ secrets.ETHEREUM_RPC_URL }}
# POLYGON_RPC_URL: ${{ secrets.POLYGON_RPC_URL }}
# AVALANCHE_RPC_URL: ${{ secrets.AVALANCHE_RPC_URL }}
# FANTOM_RPC_URL: ${{ secrets.FANTOM_RPC_URL }}
slither:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Slither
uses: crytic/[email protected]
id: slither
with:
slither-args: '--exclude-low --exclude-medium --no-fail-pedantic --exclude-optimization --exclude-informational --filter-paths mock,interfaces,lib,test --json-types console,detectors'
sarif: results.sarif
fail-on: none
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: ${{ steps.slither.outputs.sarif }}