forked from 0xPolygon/polygon-edge
-
Notifications
You must be signed in to change notification settings - Fork 7
165 lines (164 loc) · 6.69 KB
/
nightly.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
---
name: Nightly Build
on: # yamllint disable-line rule:truthy
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 0 * * *'
jobs:
check:
name: Check new commits
runs-on: ubuntu-latest
outputs:
new_commit_count: ${{ steps.get_new_commits.outputs.commit_count }}
steps:
- name: Checkout Code
uses: actions/[email protected]
- name: Get new commits
id: get_new_commits
run: echo "commit_count=$(git log --oneline --since '24 hours ago' | wc -l | tr -d ' ')" >> $GITHUB_OUTPUT
ci:
name: CI
uses: ./.github/workflows/ci.yml
needs: check
if: needs.check.outputs.new_commit_count > 0
with:
build-blade: true
lint: true
unit-test: true
e2e-polybft-test: true
e2e-legacy-test: true
property-polybft-test: true
fuzz-test: true
deploy_network:
name: Deploy Network
uses: ./.github/workflows/deploy-network.yml
needs: check
if: needs.check.outputs.new_commit_count > 0
with:
environment: nightly
block_gas_limit: "200000000"
block_time: "2"
is_london_fork_active: true
is_bridge_active: true
notification: false
secrets:
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
AWS_S3_BLADE_BUCKET: ${{ secrets.AWS_S3_BLADE_BUCKET }}
VAULT_PASSWORD: ${{ secrets.VAULT_PASSWORD }}
load_test_multiple_eoa:
name: Load Test EOA
uses: ./.github/workflows/load-test.yml
needs: deploy_network
with:
environment: nightly
scenario: EOA
timeout: "220s"
rate: "3000"
timeUnit: "1s"
duration: "10m"
preAllocatedVUs: "60"
maxVUs: "60"
notification: false
secrets:
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
AWS_S3_BLADE_BUCKET: ${{ secrets.AWS_S3_BLADE_BUCKET }}
AWS_LOADTESTRUNNER_AMI_ID: ${{ secrets.AWS_LOADTESTRUNNER_AMI_ID }}
AWS_LOADTESTRUNNER_SUBNET_ID: ${{ secrets.AWS_LOADTESTRUNNER_SUBNET_ID }}
AWS_LOADTESTRUNNER_SG_ID: ${{ secrets.AWS_LOADTESTRUNNER_SG_ID }}
AWS_LOADTESTRUNNER_MNEMONIC: ${{ secrets.AWS_LOADTESTRUNNER_MNEMONIC }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
load_test_multiple_erc20:
name: Load Test ERC20
uses: ./.github/workflows/load-test.yml
needs: [deploy_network, load_test_multiple_eoa]
with:
environment: nightly
scenario: ERC20
timeout: "220s"
rate: "1500"
timeUnit: "1s"
duration: "10m"
preAllocatedVUs: "60"
maxVUs: "60"
notification: false
secrets:
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
AWS_S3_BLADE_BUCKET: ${{ secrets.AWS_S3_BLADE_BUCKET }}
AWS_LOADTESTRUNNER_AMI_ID: ${{ secrets.AWS_LOADTESTRUNNER_AMI_ID }}
AWS_LOADTESTRUNNER_SUBNET_ID: ${{ secrets.AWS_LOADTESTRUNNER_SUBNET_ID }}
AWS_LOADTESTRUNNER_SG_ID: ${{ secrets.AWS_LOADTESTRUNNER_SG_ID }}
AWS_LOADTESTRUNNER_MNEMONIC: ${{ secrets.AWS_LOADTESTRUNNER_MNEMONIC }}
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
destroy_network:
name: Destroy Network
uses: ./.github/workflows/destroy-network.yml
needs: [deploy_network, load_test_multiple_eoa, load_test_multiple_erc20]
if: always()
with:
environment: nightly
logs: true
notification: false
secrets:
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
AWS_S3_BLADE_BUCKET: ${{ secrets.AWS_S3_BLADE_BUCKET }}
VAULT_PASSWORD: ${{ secrets.VAULT_PASSWORD }}
notification_nightly:
name: Nightly Notification
uses: ./.github/workflows/notification-nightly.yml
needs: [ci, deploy_network, load_test_multiple_eoa, load_test_multiple_erc20, destroy_network]
if: success() || failure()
with:
environment: nightly
logs: true
build_blade_output: ${{ needs.ci.outputs.build-blade }}
lint_output: ${{ needs.ci.outputs.lint }}
unit_test_output: ${{ needs.ci.outputs.unit-test }}
e2e_polybft_test_output: ${{ needs.ci.outputs.e2e-polybft-test }}
e2e_legacy_test_output: ${{ needs.ci.outputs.e2e-legacy-test }}
property_polybft_test_output: ${{ needs.ci.outputs.property-polybft-test }}
fuzz_test_output: ${{ needs.ci.outputs.fuzz-test }}
deploy_network_terraform_output: ${{ needs.deploy_network.outputs.terraform_output }}
deploy_network_ansible_output: ${{ needs.deploy_network.outputs.ansible_output }}
load_test_multiple_eoa_output: ${{ needs.load_test_multiple_eoa.outputs.load_test_output }}
load_test_multiple_erc20_output: ${{ needs.load_test_multiple_erc20.outputs.load_test_output }}
destroy_network_logs_output: ${{ needs.destroy_network.outputs.logs_output }}
destroy_network_terraform_output: ${{ needs.destroy_network.outputs.terraform_output }}
secrets:
AWS_S3_BLADE_BUCKET: ${{ secrets.AWS_S3_BLADE_BUCKET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
notification_load_test_multiple_eoa:
name: Load Test EOA Notification
uses: ./.github/workflows/notification-load-test.yml
needs: [load_test_multiple_eoa, notification_nightly]
if: (always() && needs.load_test_multiple_eoa.outputs.load_test_output == 'true')
with:
environment: nightly
scenario: EOA
tps_avg: ${{ needs.load_test_multiple_eoa.outputs.tps_avg }}
tps_max: ${{ needs.load_test_multiple_eoa.outputs.tps_max }}
iterations: ${{ needs.load_test_multiple_eoa.outputs.iterations }}
block: ${{ needs.load_test_multiple_eoa.outputs.block }}
ttm: ${{ needs.load_test_multiple_eoa.outputs.ttm }}
gas_avg: ${{ needs.load_test_multiple_eoa.outputs.gas_avg }}
gas_max: ${{ needs.load_test_multiple_eoa.outputs.gas_max }}
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
notification_load_test_multiple_erc20:
name: Load Test ERC20 Notification
uses: ./.github/workflows/notification-load-test.yml
needs: [load_test_multiple_erc20, notification_nightly]
if: (always() && needs.load_test_multiple_erc20.outputs.load_test_output == 'true')
with:
environment: nightly
scenario: ERC20
tps_avg: ${{ needs.load_test_multiple_erc20.outputs.tps_avg }}
tps_max: ${{ needs.load_test_multiple_erc20.outputs.tps_max }}
iterations: ${{ needs.load_test_multiple_erc20.outputs.iterations }}
block: ${{ needs.load_test_multiple_erc20.outputs.block }}
ttm: ${{ needs.load_test_multiple_erc20.outputs.ttm }}
gas_avg: ${{ needs.load_test_multiple_erc20.outputs.gas_avg }}
gas_max: ${{ needs.load_test_multiple_erc20.outputs.gas_max }}
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}