-
Notifications
You must be signed in to change notification settings - Fork 33
58 lines (46 loc) · 1.72 KB
/
fuzz-testing.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
name: Fuzz Testing
on:
push:
branches:
- main
pull_request:
jobs:
echidna:
name: Echidna
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
testName:
- TestFactory
- TestSwaplace
env:
DEPLOYER_PRIVATE_KEY: ${{ vars.DEPLOYER_PRIVATE_KEY }}
steps:
- uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v1
with:
node-version: 18.16.0
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install node dependencies
run: yarn install
- name: Install pip3
run: |
python -m pip install --upgrade pip
- name: Install slither
run: |
pip3 install slither-analyzer
- name: Install echidna
run: |
sudo wget -O /tmp/echidna-2.2.1-Linux.zip https://github.com/crytic/echidna/releases/download/v2.2.1/echidna-2.2.1-Linux.zip
sudo unzip /tmp/echidna-2.2.1-Linux.zip -d /usr/bin
sudo tar -xf /usr/bin/echidna.tar.gz -C /usr/bin
sudo chmod +x /usr/bin/echidna
- name: Run ${{ matrix.testName }} as properties
run: echidna . --contract ${{ matrix.testName }} --test-mode property --config echidna.config.yml
- name: Run ${{ matrix.testName }} as assertion
run: echidna . --contract ${{ matrix.testName }} --test-mode assertion --config echidna.config.yml