-
Notifications
You must be signed in to change notification settings - Fork 49
164 lines (150 loc) · 5.74 KB
/
nightly-fe-e2e-tests.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
---
name: Nightly pipeline e2e tests on featurenet
on:
workflow_dispatch:
schedule:
- cron: '00 23 * * *'
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: false
jobs:
check-vars-and-secrets:
name: Check vars and secrets
uses: ./.github/workflows/_check-vars-and-secrets.yml
secrets: inherit
build-aleph-e2e-client-image:
needs: [check-vars-and-secrets]
name: Build aleph-e2e-client image
uses: ./.github/workflows/_build-aleph-e2e-client.yml
with:
ref: ${{ github.ref }}
secrets: inherit
get-full-docker-image-path:
name: Get full aleph-node full docker path path
needs: [check-vars-and-secrets]
runs-on: ubuntu-20.04
outputs:
fqdn-image: ${{ steps.get-fqdns.outputs.fqdn-image }}
ref: ${{ steps.get-fqdns.outputs.ref }}
image-exists: ${{ steps.get-fqdns.outputs.image-exists }}
# yamllint disable-line rule:line-length
chain-bootstrapper-image-exists: ${{ steps.get-fqdns.outputs.chain-bootstrapper-image-exists }}
chain-bootstrapper-fqdn-image: ${{ steps.get-fqdns.outputs.chain-bootstrapper-fqdn-image }}
steps:
- name: Get aleph-node fqdn path from ${{ github.ref }}
id: get-fqdns
uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@v7
with:
ref: ${{ github.ref }}
test-binary: 'false'
ecr-dev-node-repo: ${{ vars.ECR_DEV_ALEPH_NODE_REPO }}
ecr-prod-node-repo: ${{ vars.ECR_ALEPH_NODE_REPO }}
ecr-chain-bootstrapper-repo: ${{ vars.ECR_CHAIN_BOOTSTRAPPER_REPO }}
build-aleph-node:
name: Build aleph-node
if: ${{ needs.get-full-docker-image-path.outputs.image-exists != 'true' }}
needs: [get-full-docker-image-path]
uses: ./.github/workflows/_build-aleph-node.yml
with:
ref: ${{ needs.get-full-docker-image-path.outputs.ref }}
production: true
push-aleph-node-image-to-ecr:
name: Build and push aleph-node image to ECR
if: ${{ needs.get-full-docker-image-path.outputs.image-exists != 'true' }}
needs:
- get-full-docker-image-path
- build-aleph-node
uses: ./.github/workflows/_push-image-to-ecr.yml
secrets: inherit
with:
binary-artifact-name: ${{ needs.build-aleph-node.outputs.artifact-name-binary }}
docker-image-name: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }}
binary-name: aleph-node
docker-file-path: ./docker/Dockerfile
build-chain-bootstrapper:
needs: [get-full-docker-image-path]
if: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-image-exists != 'true' }}
name: Build chain-bootstrapper
uses: ./.github/workflows/_build-chain-bootstrapper.yml
with:
ref: ${{ needs.get-full-docker-image-path.outputs.ref }}
production: ${{ !inputs.short-session }}
push-chain-bootstrapper-image-to-ecr:
name: Push chain-bootstrapper docker image to ECR
if: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-image-exists != 'true' }}
needs:
- get-full-docker-image-path
- build-chain-bootstrapper
uses: ./.github/workflows/_push-image-to-ecr.yml
secrets: inherit
with:
binary-artifact-name: ${{ needs.build-chain-bootstrapper.outputs.artifact-name-binary }}
# yamllint disable-line rule:line-length
docker-image-name: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-fqdn-image }}
binary-name: chain-bootstrapper
docker-file-path: ./bin/chain-bootstrapper/Dockerfile
create-featurenet:
needs:
- get-full-docker-image-path
- push-aleph-node-image-to-ecr
- push-chain-bootstrapper-image-to-ecr
if: ${{ !cancelled() }}
name: Create featurenet from ${{ github.ref }}
uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-create.yml@v7
secrets: inherit
with:
featurenet-name: 'ops-finalization-e2e'
aleph-node-image: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }}
# yamllint disable-line rule:line-length
chain-bootstrapper-image: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-fqdn-image }}
validators: '6'
expiration: '3h'
internal: true
delete-first: true
runs-finalization-e2e-test-on-fe:
needs:
- create-featurenet
- build-aleph-e2e-client-image
name: Runs finalization e2e on FE
if: ${{ !cancelled() }}
runs-on: [self-hosted, Linux, X64, small]
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ${{ needs.build-aleph-e2e-client-image.outputs.artifact-name-image }}
- name: Load aleph-e2e-client image
shell: bash
run: docker load -i aleph-e2e-client.tar
- name: Run e2e test
shell: bash
run: |
docker run --network host \
-e NODE_URL='wss://${{ needs.create-featurenet.outputs.ws-hostname }}:443' \
-e TEST_CASES='finalization::finalization' \
-e RUST_LOG=info \
aleph-e2e-client:latest
timeout-minutes: 15
delete-featurenet:
if: ${{ always() }}
needs:
- runs-finalization-e2e-test-on-fe
name: Delete featurenet
uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-delete.yml@v7
secrets: inherit
with:
featurenet-name: 'ops-finalization-e2e'
slack-notification:
name: Slack notification
runs-on: ubuntu-20.04
needs: [delete-featurenet]
if: >
!cancelled() &&
github.event_name != 'workflow_dispatch'
steps:
- name: Send Slack message
uses: Cardinal-Cryptography/github-actions/slack-notification@v7
with:
notify-on: "failure"
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_DEV_ONDUTY }}