forked from balancer/balancer-core
-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (81 loc) · 2.42 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: CI
on: [push]
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
env:
MAINNET_RPC: ${{ secrets.MAINNET_RPC }}
SEPOLIA_RPC: ${{ secrets.SEPOLIA_RPC }}
jobs:
unit-tests:
name: Run Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Foundry
uses: foundry-rs/[email protected]
with:
version: nightly
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: 'yarn'
- name: Install dependencies
run: yarn --frozen-lockfile --network-concurrency 1
- name: Precompile contracts
run: yarn build
- name: Run tests
shell: bash
run: yarn test:unit
integration-tests:
name: Run Integration Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Foundry
uses: foundry-rs/[email protected]
with:
version: nightly
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: 'yarn'
- name: Install dependencies
run: yarn --frozen-lockfile --network-concurrency 1
- name: Precompile contracts
run: yarn build
- name: Run tests
run: yarn test:integration
- name: Ensure gas snapshots were updated
run: git diff --exit-code -- .forge-snapshots/
lint:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: wagoid/commitlint-github-action@v5
- name: Install Foundry
uses: foundry-rs/[email protected]
with:
version: nightly
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: 'yarn'
- name: Install bulloak
uses: baptiste0928/cargo-install@v3
with:
crate: bulloak
- name: Install dependencies
run: yarn --frozen-lockfile --network-concurrency 1
- name: Run forge-fmt && solhint
run: yarn lint:check
- name: Run bulloak check
run: yarn lint:bulloak
- name: Ensure auto-generated smocks are up to date
run: yarn smock && git diff --exit-code -- test/smock
- name: Run natspec-smells
run: yarn lint:natspec 2>&1 >/dev/null | grep 'No issues found'