git.delta.rocks / unique-network / refs/commits / 35dd1a696a4f

difftreelog

Change CI workflows for parallel tests

Max Andreev2022-10-18parent: #67c56fa.patch.diff
in: master

6 files changed

modified.docker/Dockerfile-parachain-node-onlydiffbeforeafterboth
80 nvm install v16.16.0 && \80 nvm install v16.16.0 && \
81 nvm use v16.16.081 nvm use v16.16.0
8282
83RUN git clone https://github.com/uniquenetwork/polkadot-launch -b feature/runtime-upgrade-testing83RUN git clone https://github.com/uniquenetwork/polkadot-launch -b unique-network
8484
85RUN export NVM_DIR="$HOME/.nvm" && \85RUN export NVM_DIR="$HOME/.nvm" && \
86 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \86 [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
modified.docker/docker-compose.tmp-node.j2diffbeforeafterboth
24 expose:24 expose:
25 - 994425 - 9944
26 - 993326 - 9933
27 - 9844
27 ports:28 ports:
28 - 127.0.0.1:9944:994429 - 127.0.0.1:9944:9944
29 - 127.0.0.1:9933:993330 - 127.0.0.1:9933:9933
31 - 127.0.0.1:9844:9844
30 logging:32 logging:
31 options:33 options:
32 max-size: "1m"34 max-size: "1m"
modified.envdiffbeforeafterboth
2POLKADOT_BUILD_BRANCH=release-v0.9.292POLKADOT_BUILD_BRANCH=release-v0.9.29
33
4POLKADOT_MAINNET_BRANCH=release-v0.9.264POLKADOT_MAINNET_BRANCH=release-v0.9.26
5UNIQUE_MAINNET_TAG=v9240105STATEMINT_BUILD_BRANCH=release-parachains-v9230
6
7KUSAMA_MAINNET_BRANCH=release-v0.9.266ACALA_BUILD_BRANCH=2.9.2
8QUARTZ_MAINNET_TAG=quartz-v924012-27MOONBEAM_BUILD_BRANCH=runtime-1701
98
10UNQWND_MAINNET_BRANCH=release-v0.9.249UNIQUE_MAINNET_TAG=v924010
11
12OPAL_REPLICA_FROM=wss://eu-ws-opal.unique.network:443
13QUARTZ_REPLICA_FROM=wss://eu-ws-quartz.unique.network:443
14UNIQUE_REPLICA_FROM=wss://eu-ws.unique.network:44310UNIQUE_REPLICA_FROM=wss://eu-ws.unique.network:443
1511
16POLKADOT_LAUNCH_BRANCH=unique-network12KUSAMA_MAINNET_BRANCH=release-v0.9.26
1713STATEMINE_BUILD_BRANCH=parachains-v9270
18KARURA_BUILD_BRANCH=2.9.114KARURA_BUILD_BRANCH=2.9.1
19ACALA_BUILD_BRANCH=2.9.2
20
21MOONRIVER_BUILD_BRANCH=runtime-170115MOONRIVER_BUILD_BRANCH=runtime-1701
16
22MOONBEAM_BUILD_BRANCH=runtime-170117QUARTZ_MAINNET_TAG=quartz-v924012-2
23
24STATEMINE_BUILD_BRANCH=parachains-v927018QUARTZ_REPLICA_FROM=wss://eu-ws-quartz.unique.network:443
19
25STATEMINT_BUILD_BRANCH=release-parachains-v923020UNQWND_MAINNET_BRANCH=release-v0.9.24
21
26WESTMINT_BUILD_BRANCH=parachains-v927022WESTMINT_BUILD_BRANCH=parachains-v9270
23OPAL_MAINNET_TAG=v924010
24OPAL_REPLICA_FROM=wss://eu-ws-opal.unique.network:443
25
26POLKADOT_LAUNCH_BRANCH=unique-network
2727
28
modified.github/workflows/forkless-update-nodata_v2.ymldiffbeforeafterboth
33 uses: xom9ikk/dotenv@v1.0.233 uses: xom9ikk/dotenv@v1.0.2
3434
35 - name: Create Execution matrix35 - name: Create Execution matrix
36 uses: fabiocaccamo/create-matrix-action@v236 uses: CertainLach/create-matrix-action@v3
37 id: create_matrix37 id: create_matrix
38 with:38 with:
39 matrix: |39 matrix: |
162 if: success() || failure()162 if: success() || failure()
163 run: cat './forkless-parachain-upgrade-nodata-logs.${{ matrix.features }}/node-parachain.log'163 run: cat './forkless-parachain-upgrade-nodata-logs.${{ matrix.features }}/node-parachain.log'
164
165 - name: Run Parellel tests
166 working-directory: tests
167 run: |
168 yarn install
169 yarn add mochawesome
170 node scripts/readyness.js
171 echo "Ready to start tests"
172 yarn polkadot-types
173 NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
174 env:
175 RPC_URL: http://127.0.0.1:9933/
176
177 - name: Test Report Parallel
178 uses: phoenix-actions/test-reporting@v8
179 id: test-report-parallel
180 if: success() || failure() # run this step even if previous step failed
181 with:
182 name: Report Parallel tests results - ${{ matrix.network }} # Name of the check run which will be created
183 path: tests/mochawesome-report/test-parallel-*.json # Path to test results
184 reporter: mochawesome-json
185 fail-on-error: 'false'
186
187 - name: Run Sequential tests
188 working-directory: tests
189 run: |
190 yarn install
191 yarn add mochawesome
192 node scripts/readyness.js
193 echo "Ready to start tests"
194 yarn polkadot-types
195 NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
196 env:
197 RPC_URL: http://127.0.0.1:9933/
198
199 - name: Test Report Sequential
200 uses: phoenix-actions/test-reporting@v8
201 id: test-report-sequential
202 if: success() || failure() # run this step even if previous step failed
203 with:
204 name: Report Sequential tests results - ${{ matrix.network }} # Name of the check run which will be created
205 path: tests/mochawesome-report/test-sequential-*.json # Path to test results
206 reporter: mochawesome-json
207 fail-on-error: 'false'
164208
165 - name: Stop running containers209 - name: Stop running containers
166 if: always() # run this step always210 if: always() # run this step always
modified.github/workflows/market-test_v2.ymldiffbeforeafterboth
11 market_test:11 market_test:
12 # The type of runner that the job will run on12 # The type of runner that the job will run on
13 runs-on: [self-hosted-ci,large]13 runs-on: [self-hosted-ci,large]
14 timeout-minutes: 138014 timeout-minutes: 360
1515
16 name: ${{ matrix.network }} 16 name: ${{ matrix.network }}
1717
modified.github/workflows/node-only-update_v2.ymldiffbeforeafterboth
32 uses: xom9ikk/dotenv@v1.0.232 uses: xom9ikk/dotenv@v1.0.2
3333
34 - name: Create Execution matrix34 - name: Create Execution matrix
35 uses: fabiocaccamo/create-matrix-action@v235 uses: CertainLach/create-matrix-action@v3
36 id: create_matrix36 id: create_matrix
37 with:37 with:
38 matrix: |38 matrix: |
39 network {opal}, runtime {opal}, features {opal-runtime}, mainnet_branch {${{ env.QUARTZ_MAINNET_TAG }}}39 network {opal}, runtime {opal}, features {opal-runtime}, mainnet_branch {${{ env.OPAL_MAINNET_TAG }}}
40 network {quartz}, runtime {quartz}, features {quartz-runtime}, mainnet_branch {${{ env.QUARTZ_MAINNET_TAG }}}40 network {quartz}, runtime {quartz}, features {quartz-runtime}, mainnet_branch {${{ env.QUARTZ_MAINNET_TAG }}}
41 network {unique}, runtime {unique}, features {unique-runtime}, mainnet_branch {${{ env.UNIQUE_MAINNET_TAG }}}41 network {unique}, runtime {unique}, features {unique-runtime}, mainnet_branch {${{ env.UNIQUE_MAINNET_TAG }}}
4242
4343
4444
4949
5050
5151
52 timeout-minutes: 138052 timeout-minutes: 2880 # 48 hours for execution jobs.
5353
54 name: ${{ matrix.network }}54 name: ${{ matrix.network }}
5555
174 env:173 env:
175 RPC_URL: http://127.0.0.1:9933/174 RPC_URL: http://127.0.0.1:9933/
176175
177 - name: Test Report Before Node upgrade176 - name: Upload Test Report Before Node upgrade
178 uses: phoenix-actions/test-reporting@v8177 uses: phoenix-actions/test-reporting@v8
179 id: test-report-before178 id: test-report-before
180 if: success() || failure() # run this step even if previous step failed179 if: success() || failure() # run this step even if previous step failed
185 fail-on-error: 'false'184 fail-on-error: 'false'
186185
186
187 # TODO uncomment thease steps after the merge
188 #- name: Run Parallel tests before Node Parachain upgrade
189 # working-directory: ${{ matrix.mainnet_branch }}/tests
190 # run: |
191 # yarn install
192 # yarn add mochawesome
193 # echo "Ready to start tests"
194 # yarn polkadot-types
195 # NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
196 # env:
197 # RPC_URL: http://127.0.0.1:9933/
198
199 #- name: Upload Parallel Test Report Before Node upgrade
200 # uses: phoenix-actions/test-reporting@v8
201 # id: test-parallel-report-before
202 # if: success() || failure() # run this step even if previous step failed
203 # with:
204 # name: Tests before node upgrade ${{ matrix.network }} # Name of the check run which will be created
205 # path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-parallel-*.json # Path to test results
206 # reporter: mochawesome-json
207 # fail-on-error: 'false'
208
209 # - name: Run Sequential tests before Node Parachain upgrade
210 # if: success() || failure()
211 # working-directory: ${{ matrix.mainnet_branch }}/tests
212 # run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
213 # env:
214 # RPC_URL: http://127.0.0.1:9933/
215
216 # - name: Upload Sequential Test Report Before Node upgrade
217 # uses: phoenix-actions/test-reporting@v8
218 # id: test-sequential-report-before
219 # if: success() || failure() # run this step even if previous step failed
220 # with:
221 # name: Tests before node upgrade ${{ matrix.network }} # Name of the check run which will be created
222 # path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-sequential-*.json # Path to test results
223 # reporter: mochawesome-json
224 # fail-on-error: 'false'
225
187 - name: Send SIGUSR1 to polkadotlaunch process226 - name: Send SIGUSR1 to polkadot-launch process
188 if: success() || failure()227 if: success() || failure()
189 run: |228 run: |
190 #Get PID of polkadot-launch229 #Get PID of polkadot-launch
191 PID=$(docker exec node-parachain pidof 'polkadot-launch')230 ContainerID=$(docker ps -aqf "name=node-parachain")
231 PID=$(docker exec node-parachain pidof 'polkadot-launch')
192 echo "Polkadot-launch PID: $PID"232 echo "Polkadot-launch PID: $PID"
193 #Send SIGUSR1 signal to $PID233 #Send SIGUSR1 signal to $PID
194 docker exec node-parachain kill -SIGUSR1 ${PID}234 docker exec node-parachain kill -SIGUSR1 ${PID}
195235 echo "SIGUSR1 sent to Polkadot-launch PID: $PID"
196 # 🌗 All parachain collators restarted with the new binaries.236 docker logs ${ContainerID}
237
238 - name: Get chain logs in case of docker image crashed after Polkadot Launch restart
239 if: failure() # run this step only at failure
240 run: |
241 docker exec node-parachain cat /polkadot-launch/9944.log
242 docker exec node-parachain cat /polkadot-launch/9945.log
243 docker exec node-parachain cat /polkadot-launch/alice.log
244 docker exec node-parachain cat /polkadot-launch/eve.log
245 docker exec node-parachain cat /polkadot-launch/dave.log
246 docker exec node-parachain cat /polkadot-launch/charlie.log
247
248 # 🌗 All parachain collators restarted with the new binaries.
197 - name: Check if docker logs consist messages related to testing of Node Parachain Upgrade.249 - name: Check if docker logs consist messages related to testing of Node Parachain Upgrade.
198 if: success()250 if: success()
199 run: |251 run: |
239 exit 0291 exit 0
240 shell: bash292 shell: bash
241293
294 ## TODO: Remove next two blocks before switch to Parrallel & Sequental tests. Uncoment commented blocks.
242 - name: Run tests after Node Parachain upgrade295 - name: Run tests after Node Parachain upgrade
243 working-directory: tests296 working-directory: ${{ matrix.mainnet_branch }}/tests
244 run: |297 run: |
245 yarn install298 yarn install
246 yarn add mochawesome299 yarn add mochawesome
257 if: success() || failure() # run this step even if previous step failed310 if: success() || failure() # run this step even if previous step failed
258 with:311 with:
259 name: Tests after node upgrade ${{ matrix.network }} # Name of the check run which will be created312 name: Tests after node upgrade ${{ matrix.network }} # Name of the check run which will be created
260 path: tests/mochawesome-report/test-*.json # Path to test results313 path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-*.json # Path to test results
261 reporter: mochawesome-json314 reporter: mochawesome-json
262 fail-on-error: 'false'315 fail-on-error: 'false'
316
317 # TODO uncomment thease steps after the merge
318 #- name: Run Parallel tests after Node Parachain upgrade
319 # working-directory: ${{ matrix.mainnet_branch }}/tests
320 # run: |
321 # yarn install
322 # yarn add mochawesome
323 # node scripts/readyness.js
324 # echo "Ready to start tests"
325 # yarn polkadot-types
326 # NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
327 # env:
328 # RPC_URL: http://127.0.0.1:9933/
329
330 #- name: Test Report Parallel After Node upgrade
331 # uses: phoenix-actions/test-reporting@v8
332 # id: test-report-parallel-after
333 # if: success() || failure() # run this step even if previous step failed
334 # with:
335 # name: Tests after node upgrade ${{ matrix.network }} # Name of the check run which will be created
336 # path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-parallel-*.json # Path to test results
337 # reporter: mochawesome-json
338 # fail-on-error: 'false'
339
340 #- name: Run Sequential tests after Node Parachain upgrade
341 # if: success() || failure()
342 # working-directory: ${{ matrix.mainnet_branch }}/tests
343 # run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
344 # env:
345 # RPC_URL: http://127.0.0.1:9933/
346
347 #- name: Upload Sequential Test Report After Node upgrade
348 # uses: phoenix-actions/test-reporting@v8
349 # id: test-sequential-report-after
350 # if: success() || failure() # run this step even if previous step failed
351 # with:
352 # name: Tests before node upgrade ${{ matrix.network }} # Name of the check run which will be created
353 # path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-sequential-*.json # Path to test results
354 # reporter: mochawesome-json
355 # fail-on-error: 'false'
263356
264357
265 - name: Stop running containers358 - name: Stop running containers
273 docker system prune -f366 docker system prune -f
274 docker image prune -f -a367 docker image prune -f -a
275368
276 - name: Clean Workspace369 - name: Remove repo at the end
277 if: always()370 if: always() # run this step always
278 uses: AutoModality/action-clean@v1.1.0371 run: |
372 ls -ls ./
279373