-
Notifications
You must be signed in to change notification settings - Fork 214
111 lines (84 loc) · 2.72 KB
/
test.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Tests
on:
pull_request:
schedule:
- cron: "0 1 * * *" # 1am UTC
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: "14"
- run: npm install
- name: Lint JavaScript
run: npm run lint:js
- name: Lint Solidity contracts
run: npm run lint:contracts
- name: Compiling all contracts
run: npm run cc
- name: Test deployment scripts
run: npm run ganache >/dev/null 2>&1 & npm run test:deployment
- name: Running unit tests
run: npm run ganache >/dev/null 2>&1 & npm run test
- name: Cleaning up ganache
run: lsof -ti tcp:8545 | xargs kill
- name: Running coverage
run: npm run test:coverage
integration-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: "14"
- run: npm install
- name: Compiling all contracts
run: npm run cc
- name: Running integration tests
env:
ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }}
run: npm run mainnet-fork >/dev/null 2>&1 & npm run test:integration
security-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: "14"
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.9.7"
- run: npm install
- name: Compiling all contracts
run: npm run cc
- name: "Setup slither analyser https://github.com/crytic/slither"
run: |
sudo pip3 install slither-analyzer==0.8.3
sudo apt-get install jq
- name: "Setup solc-select"
run: |
sudo pip3 install solc-select
solc-select install 0.5.4
solc-select install 0.8.3
- name: "Run slither on infrastructure contracts based on solc 0.5"
run: |
export PATH=/home/circleci/.solc-select:$PATH
npm run security:slither:infrastructure_0.5
- name: "Run slither on infrastructure contracts based on solc 0.8"
run: |
export PATH=/home/circleci/.solc-select:$PATH
npm run security:slither:infrastructure
- name: "Run slither on wallet modules contracts"
run: |
export PATH=/home/circleci/.solc-select:$PATH
npm run security:slither:modules
- name: "Run slither on wallet contracts"
run: |
export PATH=/home/circleci/.solc-select:$PATH
npm run security:slither:wallet