-
Notifications
You must be signed in to change notification settings - Fork 93
194 lines (168 loc) · 6.14 KB
/
integration-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
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
name: Zombienet Integration Tests
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions: {}
env:
IMAGE_NAME: paritypr/zombienet
VERSION: ${{ github.sha }}
RUN_IN_CONTAINER: 1
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 1
GHA_CLUSTER_SERVER_ADDR: "https://kubernetes.default:443"
jobs:
# build_image:
# name: Build image
# runs-on: ubuntu-latest
# timeout-minutes: 30
# steps:
# - name: Check out the repo
# uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0
# - name: npm build
# run: |
# cd javascript
# npm install
# npm dedupe
# npm run clean
# npm run build
# - name: Build Docker image
# uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
# with:
# file: ./scripts/ci/docker/zombienet_injected.Dockerfile
# context: .
# push: false
# tags: |
# ${{ env.IMAGE_NAME }}:${{ env.VERSION }}
# ${{ env.IMAGE_NAME }}:latest
build_push_image:
name: Build and Push Docker image to Docker Hub
runs-on: ubuntu-latest
timeout-minutes: 30
# needs: [build_image]
steps:
- name: Check out the repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0
- name: npm build
run: |
cd javascript
npm install
npm dedupe
npm run clean
npm run build
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}
- name: Build Docker image
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
with:
file: ./scripts/ci/docker/zombienet_injected.Dockerfile
context: .
push: true
tags: |
${{ env.IMAGE_NAME }}:${{ env.VERSION }}
${{ env.IMAGE_NAME }}:latest
set-variables:
name: Set variables
runs-on: ubuntu-latest
outputs:
VERSION: ${{ steps.version.outputs.IMAGE }}
steps:
- name: Define version
id: version
run: |
export IMAGE="${{ env.IMAGE_NAME }}:${{ env.VERSION }}"
echo "IMAGE=${IMAGE}" >> $GITHUB_OUTPUT
echo "set IMAGE=${IMAGE}"
export DEBUG=zombie
export ZOMBIENET_INTEGRATION_TEST_IMAGE="docker.io/paritypr/polkadot-debug:master"
export COL_IMAGE="docker.io/paritypr/colander:master"
# TODO: add script to get latest from dockerhub
export CUMULUS_TEST_IMAGE="docker.io/paritypr/test-parachain:c90f9713b5bc73a9620b2e72b226b4d11e018190"
zombienet-smoke:
name: Zombienet Smoke Tests
runs-on: zombienet-arc-runner
timeout-minutes: 30
container:
image: ${{ needs.set-variables.outputs.VERSION }}
needs: [build_push_image, set-variables]
#env:
# LOCAL_DIR: "/builds/parity/mirrors/zombienet/tests"
steps:
- name: Check out the repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0
- name: smoke test
run: |
echo "Zombienet Tests"
echo "${ZOMBIENET_IMAGE}"
echo "${GH_DIR}"
echo "relay_image ${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
echo "col_image ${COL_IMAGE}"
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh --local-dir="$(pwd)/tests" --test="0001-smoke.zndsl"
zombienet-scale-net-config:
name: Zombienet Scale net
runs-on: zombienet-arc-runner
timeout-minutes: 30
container:
image: ${{ needs.set-variables.outputs.VERSION }}
needs: [build_push_image, set-variables]
#env:
# LOCAL_DIR: "/builds/parity/mirrors/zombienet/tests"
steps:
- name: Check out the repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0
- name: scale-net test
run: |
echo "Zombienet Scale Net"
echo "${ZOMBIENET_IMAGE}"
echo "${GH_DIR}"
echo "relay_image ${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
echo "col_image ${COL_IMAGE}"
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh --local-dir="$(pwd)/tests/scale-net" --test="0001-scale-net.zndsl"
zombienet-upgrade-node:
name: Zombienet Upgrade Node
runs-on: zombienet-arc-runner
timeout-minutes: 30
container:
image: ${{ needs.set-variables.outputs.VERSION }}
needs: [build_push_image, set-variables]
#env:
# LOCAL_DIR: "/builds/parity/mirrors/zombienet/tests"
steps:
- name: Check out the repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0
- name: upgrade node test
run: |
echo "Zombienet Upgrade Node"
echo "${ZOMBIENET_IMAGE}"
echo "${GH_DIR}"
export COL_IMAGE="docker.io/paritypr/colander:4519"
echo "relay_image ${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
echo "col_image ${COL_IMAGE}"
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh --local-dir="$(pwd)/tests/k8s" --test="0001-upgrade-node.zndsl"
zombienet-chaos-delay:
name: Zombienet Upgrade Node
runs-on: zombienet-arc-runner
timeout-minutes: 30
container:
image: ${{ needs.set-variables.outputs.VERSION }}
needs: [build_push_image, set-variables]
#env:
# LOCAL_DIR: "/builds/parity/mirrors/zombienet/tests"
steps:
- name: Check out the repo
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v.4.2.0
- name: chaos-delay test
run: |
echo "Zombienet Chaos Delay"
echo "${ZOMBIENET_IMAGE}"
echo "${GH_DIR}"
echo "relay_image ${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
echo "col_image ${COL_IMAGE}"
/home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh --local-dir="$(pwd)/tests/chaos" --test="0001-delay.zndsl"