-
Notifications
You must be signed in to change notification settings - Fork 375
213 lines (191 loc) · 7.14 KB
/
build-test-deploy-dev.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
name: Build and deploy to IPFS
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
on:
pull_request:
branches: ['main']
jobs:
build:
runs-on: ubuntu-latest
if: |
(github.event_name == 'push' && github.event_name == 'pull_request') ||
(github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name &&
!contains(github.head_ref, 'dependabot'))
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
with:
persist-credentials: false
- name: Build App
uses: ./.github/actions/build
with:
NEXT_PUBLIC_ENV: 'prod'
NEXT_PUBLIC_FORK_BASE_CHAIN_ID: ${{ secrets[format('FORK_BASE_CHAIN_ID_{0}', github.event.pull_request.number)] }}
NEXT_PUBLIC_FORK_CHAIN_ID: ${{ secrets[format('FORK_CHAIN_ID_{0}', github.event.pull_request.number)] }}
NEXT_PUBLIC_FORK_URL_RPC: ${{ secrets[format('FORK_URL_RPC_{0}', github.event.pull_request.number)] }}
NEXT_PUBLIC_MIXPANEL: ${{ secrets.NEXT_PUBLIC_MIXPANEL }}
NEXT_PUBLIC_FIAT_ON_RAMP: 'false'
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
NEXT_PUBLIC_SUBGRAPH_API_KEY: ${{ secrets.NEXT_PUBLIC_SUBGRAPH_API_KEY }}
- name: Upload artifacts
uses: ./.github/actions/upload-artifacts
with:
BUILD_ARTIFACT_NAME: 'out'
cypress_smoke_v2:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip cypress]')"
needs: build
strategy:
fail-fast: false
matrix:
market:
- polygon
- avalanche
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: Run tests
uses: ./.github/actions/cypress
with:
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v2-markets/${{ matrix.market }}-v2-smoke.config.ts
cypress_smoke_v3:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip cypress]')"
needs: build
strategy:
fail-fast: false
matrix:
market:
- polygon
- avalanche
- optimism
- ethereum
- base
- gho
- gnosis
- bnb
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: Run tests
uses: ./.github/actions/cypress
with:
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-smoke.config.ts
next_js_analyze:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: download build
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0
with:
name: nextjs_build
path: .next
- uses: ./.github/actions/analyze-comment
if: github.event_name == 'pull_request'
with:
PULL_REQUEST_NUMBER: ${{ github.event.number }}
deploy:
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: download build
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # v3.0.0
with:
name: out
path: out
- name: pinata
id: pinata
uses: aave/pinata-action@35662944e92cf082457973f10aa42e48df179b47
with:
PINATA_API_KEY: ${{ secrets.PINATA_API_KEY }}
PINATA_SECRET_KEY: ${{ secrets.PINATA_SECRET_KEY }}
PIN_ALIAS: 'app-aave-${{ github.head_ref || github.ref }}'
BUILD_LOCATION: './out'
CID_VERSION: 1
- name: Pin to primary IPFS server
id: ipfs-primary
uses: ./.github/actions/ipfs-pin
with:
IPFS_SERVER_PORT: '${{ secrets.IPFS_PRIMARY_SERVER_PORT }}'
IPFS_SERVER: '${{ secrets.IPFS_PRIMARY_SERVER }}'
IPFS_SERVER_KEY: '${{ secrets.IPFS_PRIMARY_SERVER_KEY }}'
BUILD_PATH: 'out'
cypress_full_v2:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip cypress]')"
needs:
- deploy
- cypress_smoke_v2
- cypress_smoke_v3
strategy:
fail-fast: false
matrix:
market:
- polygon
- avalanche
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: Run tests
uses: ./.github/actions/cypress
with:
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v2-markets/${{ matrix.market }}-v2-full.config.ts
cypress_full_v3:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip cypress]')"
needs:
- deploy
- cypress_smoke_v2
- cypress_smoke_v3
strategy:
fail-fast: false
matrix:
market:
- polygon
- optimism
- ethereum
- gho
- base
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: Run tests
uses: ./.github/actions/cypress
with:
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/v3-markets/${{ matrix.market }}-v3-full.config.ts
cypress_app_functionality:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip cypress]')"
needs:
- deploy
- cypress_smoke_v2
- cypress_smoke_v3
strategy:
fail-fast: false
matrix:
scoupe:
- settings
- mobile
- governance-stake
- widgets
- general
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3.0.2
- name: Run tests
uses: ./.github/actions/cypress
with:
CYPRESS_TENDERLY_ACCOUNT: ${{ secrets.TENDERLY_ACCOUNT }}
CYPRESS_TENDERLY_KEY: ${{ secrets.TENDERLY_KEY }}
CYPRESS_TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }}
YARN_TEST_COMMAND: npx cypress-repeat run -n 2 --rerun-failed-only --config-file ./cypress/configs/${{ matrix.scoupe }}.config.ts