difftreelog
Change CI workflows for parallel tests
in: master
6 files changed
.docker/Dockerfile-parachain-node-onlydiffbeforeafterboth80 nvm install v16.16.0 && \80 nvm install v16.16.0 && \81 nvm use v16.16.081 nvm use v16.16.0828283RUN git clone https://github.com/uniquenetwork/polkadot-launch -b feature/runtime-upgrade-testing83RUN git clone https://github.com/uniquenetwork/polkadot-launch -b unique-network848485RUN 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" && \.docker/docker-compose.tmp-node.j2diffbeforeafterboth24 expose:24 expose:25 - 994425 - 994426 - 993326 - 993327 - 984427 ports:28 ports:28 - 127.0.0.1:9944:994429 - 127.0.0.1:9944:994429 - 127.0.0.1:9933:993330 - 127.0.0.1:9933:993331 - 127.0.0.1:9844:984430 logging:32 logging:31 options:33 options:32 max-size: "1m"34 max-size: "1m".envdiffbeforeafterboth2POLKADOT_BUILD_BRANCH=release-v0.9.292POLKADOT_BUILD_BRANCH=release-v0.9.29334POLKADOT_MAINNET_BRANCH=release-v0.9.264POLKADOT_MAINNET_BRANCH=release-v0.9.265UNIQUE_MAINNET_TAG=v9240105STATEMINT_BUILD_BRANCH=release-parachains-v923067KUSAMA_MAINNET_BRANCH=release-v0.9.266ACALA_BUILD_BRANCH=2.9.28QUARTZ_MAINNET_TAG=quartz-v924012-27MOONBEAM_BUILD_BRANCH=runtime-17019810UNQWND_MAINNET_BRANCH=release-v0.9.249UNIQUE_MAINNET_TAG=v9240101112OPAL_REPLICA_FROM=wss://eu-ws-opal.unique.network:44313QUARTZ_REPLICA_FROM=wss://eu-ws-quartz.unique.network:44314UNIQUE_REPLICA_FROM=wss://eu-ws.unique.network:44310UNIQUE_REPLICA_FROM=wss://eu-ws.unique.network:443151116POLKADOT_LAUNCH_BRANCH=unique-network12KUSAMA_MAINNET_BRANCH=release-v0.9.261713STATEMINE_BUILD_BRANCH=parachains-v927018KARURA_BUILD_BRANCH=2.9.114KARURA_BUILD_BRANCH=2.9.119ACALA_BUILD_BRANCH=2.9.22021MOONRIVER_BUILD_BRANCH=runtime-170115MOONRIVER_BUILD_BRANCH=runtime-17011622MOONBEAM_BUILD_BRANCH=runtime-170117QUARTZ_MAINNET_TAG=quartz-v924012-22324STATEMINE_BUILD_BRANCH=parachains-v927018QUARTZ_REPLICA_FROM=wss://eu-ws-quartz.unique.network:4431925STATEMINT_BUILD_BRANCH=release-parachains-v923020UNQWND_MAINNET_BRANCH=release-v0.9.242126WESTMINT_BUILD_BRANCH=parachains-v927022WESTMINT_BUILD_BRANCH=parachains-v927023OPAL_MAINNET_TAG=v92401024OPAL_REPLICA_FROM=wss://eu-ws-opal.unique.network:4432526POLKADOT_LAUNCH_BRANCH=unique-network272728.github/workflows/forkless-update-nodata_v2.ymldiffbeforeafterboth33 uses: xom9ikk/dotenv@v1.0.233 uses: xom9ikk/dotenv@v1.0.2343435 - name: Create Execution matrix35 - name: Create Execution matrix36 uses: fabiocaccamo/create-matrix-action@v236 uses: CertainLach/create-matrix-action@v337 id: create_matrix37 id: create_matrix38 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: tests167 run: |168 yarn install169 yarn add mochawesome170 node scripts/readyness.js171 echo "Ready to start tests"172 yarn polkadot-types173 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 Parallel178 uses: phoenix-actions/test-reporting@v8179 id: test-report-parallel180 if: success() || failure() # run this step even if previous step failed181 with:182 name: Report Parallel tests results - ${{ matrix.network }} # Name of the check run which will be created183 path: tests/mochawesome-report/test-parallel-*.json # Path to test results184 reporter: mochawesome-json185 fail-on-error: 'false'186 187 - name: Run Sequential tests 188 working-directory: tests189 run: |190 yarn install191 yarn add mochawesome192 node scripts/readyness.js193 echo "Ready to start tests"194 yarn polkadot-types195 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 Sequential200 uses: phoenix-actions/test-reporting@v8201 id: test-report-sequential202 if: success() || failure() # run this step even if previous step failed203 with:204 name: Report Sequential tests results - ${{ matrix.network }} # Name of the check run which will be created205 path: tests/mochawesome-report/test-sequential-*.json # Path to test results206 reporter: mochawesome-json207 fail-on-error: 'false'164208165 - name: Stop running containers209 - name: Stop running containers166 if: always() # run this step always210 if: always() # run this step always.github/workflows/market-test_v2.ymldiffbeforeafterboth11 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 on13 runs-on: [self-hosted-ci,large]13 runs-on: [self-hosted-ci,large]14 timeout-minutes: 138014 timeout-minutes: 360151516 name: ${{ matrix.network }} 16 name: ${{ matrix.network }} 1717.github/workflows/node-only-update_v2.ymldiffbeforeafterboth32 uses: xom9ikk/dotenv@v1.0.232 uses: xom9ikk/dotenv@v1.0.2333334 - name: Create Execution matrix34 - name: Create Execution matrix35 uses: fabiocaccamo/create-matrix-action@v235 uses: CertainLach/create-matrix-action@v336 id: create_matrix36 id: create_matrix37 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 }}}42424343444449495050515152 timeout-minutes: 138052 timeout-minutes: 2880 # 48 hours for execution jobs.535354 name: ${{ matrix.network }}54 name: ${{ matrix.network }}5555174 env:173 env:175 RPC_URL: http://127.0.0.1:9933/174 RPC_URL: http://127.0.0.1:9933/176175177 - name: Test Report Before Node upgrade176 - name: Upload Test Report Before Node upgrade178 uses: phoenix-actions/test-reporting@v8177 uses: phoenix-actions/test-reporting@v8179 id: test-report-before178 id: test-report-before180 if: success() || failure() # run this step even if previous step failed179 if: success() || failure() # run this step even if previous step failed185 fail-on-error: 'false'184 fail-on-error: 'false'186185186187 # TODO uncomment thease steps after the merge188 #- name: Run Parallel tests before Node Parachain upgrade189 # working-directory: ${{ matrix.mainnet_branch }}/tests190 # run: |191 # yarn install192 # yarn add mochawesome193 # echo "Ready to start tests"194 # yarn polkadot-types195 # NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}196 # env:197 # RPC_URL: http://127.0.0.1:9933/198199 #- name: Upload Parallel Test Report Before Node upgrade200 # uses: phoenix-actions/test-reporting@v8201 # id: test-parallel-report-before202 # if: success() || failure() # run this step even if previous step failed203 # with:204 # name: Tests before node upgrade ${{ matrix.network }} # Name of the check run which will be created205 # path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-parallel-*.json # Path to test results206 # reporter: mochawesome-json207 # fail-on-error: 'false'208209 # - name: Run Sequential tests before Node Parachain upgrade210 # if: success() || failure()211 # working-directory: ${{ matrix.mainnet_branch }}/tests212 # 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/215216 # - name: Upload Sequential Test Report Before Node upgrade217 # uses: phoenix-actions/test-reporting@v8218 # id: test-sequential-report-before219 # if: success() || failure() # run this step even if previous step failed220 # with:221 # name: Tests before node upgrade ${{ matrix.network }} # Name of the check run which will be created222 # path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-sequential-*.json # Path to test results223 # reporter: mochawesome-json224 # fail-on-error: 'false'225 187 - name: Send SIGUSR1 to polkadotlaunch process226 - name: Send SIGUSR1 to polkadot-launch process188 if: success() || failure()227 if: success() || failure()189 run: |228 run: |190 #Get PID of polkadot-launch229 #Get PID of polkadot-launch191 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 $PID194 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 restart239 if: failure() # run this step only at failure240 run: |241 docker exec node-parachain cat /polkadot-launch/9944.log242 docker exec node-parachain cat /polkadot-launch/9945.log243 docker exec node-parachain cat /polkadot-launch/alice.log244 docker exec node-parachain cat /polkadot-launch/eve.log245 docker exec node-parachain cat /polkadot-launch/dave.log246 docker exec node-parachain cat /polkadot-launch/charlie.log 247248 # 🌗 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 0240 shell: bash292 shell: bash241293 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 upgrade243 working-directory: tests296 working-directory: ${{ matrix.mainnet_branch }}/tests244 run: |297 run: |245 yarn install298 yarn install246 yarn add mochawesome299 yarn add mochawesome257 if: success() || failure() # run this step even if previous step failed310 if: success() || failure() # run this step even if previous step failed258 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 created260 path: tests/mochawesome-report/test-*.json # Path to test results313 path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-*.json # Path to test results261 reporter: mochawesome-json314 reporter: mochawesome-json262 fail-on-error: 'false'315 fail-on-error: 'false'316317 # TODO uncomment thease steps after the merge318 #- name: Run Parallel tests after Node Parachain upgrade319 # working-directory: ${{ matrix.mainnet_branch }}/tests320 # run: |321 # yarn install322 # yarn add mochawesome323 # node scripts/readyness.js324 # echo "Ready to start tests"325 # yarn polkadot-types326 # NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}327 # env:328 # RPC_URL: http://127.0.0.1:9933/329330 #- name: Test Report Parallel After Node upgrade331 # uses: phoenix-actions/test-reporting@v8332 # id: test-report-parallel-after333 # if: success() || failure() # run this step even if previous step failed334 # with:335 # name: Tests after node upgrade ${{ matrix.network }} # Name of the check run which will be created336 # path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-parallel-*.json # Path to test results337 # reporter: mochawesome-json338 # fail-on-error: 'false'339 340 #- name: Run Sequential tests after Node Parachain upgrade341 # if: success() || failure()342 # working-directory: ${{ matrix.mainnet_branch }}/tests343 # 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/346347 #- name: Upload Sequential Test Report After Node upgrade348 # uses: phoenix-actions/test-reporting@v8349 # id: test-sequential-report-after350 # if: success() || failure() # run this step even if previous step failed351 # with:352 # name: Tests before node upgrade ${{ matrix.network }} # Name of the check run which will be created353 # path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-sequential-*.json # Path to test results354 # reporter: mochawesome-json355 # fail-on-error: 'false'263356264357265 - name: Stop running containers358 - name: Stop running containers273 docker system prune -f366 docker system prune -f274 docker image prune -f -a367 docker image prune -f -a275368276 - name: Clean Workspace369 - name: Remove repo at the end277 if: always()370 if: always() # run this step always278 uses: AutoModality/action-clean@v1.1.0371 run: |372 ls -ls ./279373