This repository has been archived by the owner on Oct 31, 2024. It is now read-only.
forked from 0xPolygon/polygon-edge
-
Notifications
You must be signed in to change notification settings - Fork 1
159 lines (150 loc) · 5.37 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
---
name: Nightly Build
on: #yamllint disable-line rule:truthy
workflow_dispatch:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 0 * * *'
permissions:
id-token: write
contents: read
security-events: write
jobs:
build:
name: Build
uses: ./.github/workflows/build.yml
test:
name: Test
uses: ./.github/workflows/test.yml
needs: build
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
e2e:
name: PolyBFT E2E Tests
uses: ./.github/workflows/e2e-polybft.yml
needs: build
e2eibft:
name: IBFT E2E Tests
uses: ./.github/workflows/e2e.yaml
needs: build
property:
name: Polybft Property Tests
uses: ./.github/workflows/property-polybft.yml
needs: build
fuzz:
name: Fuzz Tests
uses: ./.github/workflows/fuzz-test.yml
needs: build
loadtest:
name: Build Devnet
uses: ./.github/workflows/deploy.nightly.devnet.yml
secrets:
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_ROLE_ARN: ${{ secrets.AWS_ROLE_ARN }}
TF_VAR_DEPLOYMENT_NAME: ${{ secrets.TF_VAR_DEPLOYMENT_NAME }}
TF_VAR_OWNER: ${{ secrets.TF_VAR_OWNER }}
TF_VAR_BASE_INSTANCE_TYPE: ${{ secrets.TF_VAR_BASE_INSTANCE_TYPE }}
SLACK_PERFORMANCE_WEBHOOK_URL: ${{ secrets.SLACK_PERFORMANCE_WEBHOOK_URL }}
DD_API_KEY: ${{ secrets.DD_API_KEY }}
LOADTEST_MNEMONIC: ${{ secrets.LOADTEST_MNEMONIC }}
VAULT_PASSWORD_FILE: ${{ secrets.VAULT_PASSWORD_FILE }}
with:
environment: devnet
notification:
name: Nightly Notifications
runs-on: ubuntu-latest
needs: [build, test, e2e, e2eibft, property, fuzz, loadtest]
if: success() || failure()
steps:
- name: Notify Slack
uses: slackapi/[email protected]
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_EDGE_GITHUB_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
with:
payload: |
{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "Nightly Build"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Status* ${{ needs.build.outputs.workflow_output == '' && needs.test.outputs.workflow_output == '' && needs.property.outputs.workflow_output == '' && needs.e2e.outputs.workflow_output == '' && ':white_check_mark:' || ':x: `failed`' }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Build ${{ needs.build.outputs.workflow_output == '' && ':white_check_mark:' || ':x: `failed`' }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Unit tests ${{ needs.test.outputs.workflow_output == '' && ':white_check_mark:' || ':x: `failed`' }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Property tests ${{ needs.property.outputs.workflow_output == '' && ':white_check_mark:' || ':x: `failed`' }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "E2E tests ${{ needs.e2e.outputs.workflow_output == '' && ':white_check_mark:' || ':x: `failed`' }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "E2E IBFT tests ${{ needs.e2eibft.outputs.workflow_output == '' && ':white_check_mark:' || ':x: `failed`' }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Fuzz tests ${{ needs.fuzz.outputs.workflow_output == '' && ':white_check_mark:' || ':x: `failed`' }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Load tests (multiple_EOA) ${{ needs.loadtest.outputs.workflow_output_loadtest1 == 'true' && ':white_check_mark:' || ':x: `failed`' }}"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Load tests (multiple_ERC20) ${{ needs.loadtest.outputs.workflow_output_loadtest2 == 'true' && ':white_check_mark:' || ':x: `failed`' }}"
}
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Workflow: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|Results>"
}
}
]
}