-
Notifications
You must be signed in to change notification settings - Fork 11
122 lines (100 loc) · 2.92 KB
/
ci.yml
File metadata and controls
122 lines (100 loc) · 2.92 KB
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
112
113
114
115
116
117
118
119
120
121
122
name: CI
on: [push]
permissions: {}
env:
FOUNDRY_PROFILE: ci
jobs:
lint:
name: Forge Lint
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
submodules: recursive
- uses: ./.github/actions/setup-foundry
- name: Run Forge fmt --check
shell: bash
run: |
forge fmt --check
static-analysis:
name: Slither Analysis
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
submodules: recursive
- uses: crytic/slither-action@b52cc1cbfee9ca3e8722dd5224299d16c9a6b80f # v0.4.2
with:
fail-on: high
slither-args: --filter-paths "./lib|./test"
node-version: 18
test:
name: Build and Test
permissions:
contents: read
env:
DEPLOYMENTS: ${{ vars.DEPLOYMENTS }}
MAINNET_BRIDGE_ADDRESS: ${{ vars.MAINNET_BRIDGE_ADDRESS }}
MAINNET_FLOW_RATED_TOKENS: ${{ vars.MAINNET_FLOW_RATED_TOKENS }}
TESTNET_BRIDGE_ADDRESS: ${{ vars.TESTNET_BRIDGE_ADDRESS }}
TESTNET_FLOW_RATED_TOKENS: ${{ vars.TESTNET_FLOW_RATED_TOKENS }}
MAINNET_RPC_URL: ${{ secrets.MAINNET_RPC_URL }}
TESTNET_RPC_URL: ${{ secrets.TESTNET_RPC_URL }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
submodules: recursive
- uses: ./.github/actions/setup-node
- uses: ./.github/actions/setup-foundry
- name: Run build
shell: bash
run: yarn build
- name: Run Forge build
shell: bash
run: |
forge --version
forge build
- name: Run Unit Tests
shell: bash
run: |
forge test --match-path "test/unit/**" -vvv
- name: Run Integration Tests
shell: bash
run: |
forge test --match-path "test/integration/**" -vvv
- name: Run Fuzz Tests
shell: bash
run: |
forge test --match-path "test/fuzz/**" -vvv
- name: Run Fork Tests
shell: bash
run: |
forge test --match-path "test/fork/**" -vvvvv
e2e:
name: End to End Test
permissions:
contents: read
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ./.github/actions/setup-node
- uses: ./.github/actions/setup-foundry
- name: Run build
shell: bash
run: yarn build
- name: Run Test
shell: bash
run: |
yarn local:start &
yarn local:ci