difftreelog
Change CI workflows for parallel tests
in: master
6 files changed
.docker/Dockerfile-parachain-node-onlydiffbeforeafterboth--- a/.docker/Dockerfile-parachain-node-only
+++ b/.docker/Dockerfile-parachain-node-only
@@ -80,7 +80,7 @@
nvm install v16.16.0 && \
nvm use v16.16.0
-RUN git clone https://github.com/uniquenetwork/polkadot-launch -b feature/runtime-upgrade-testing
+RUN git clone https://github.com/uniquenetwork/polkadot-launch -b unique-network
RUN export NVM_DIR="$HOME/.nvm" && \
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
.docker/docker-compose.tmp-node.j2diffbeforeafterboth--- a/.docker/docker-compose.tmp-node.j2
+++ b/.docker/docker-compose.tmp-node.j2
@@ -24,9 +24,11 @@
expose:
- 9944
- 9933
+ - 9844
ports:
- 127.0.0.1:9944:9944
- 127.0.0.1:9933:9933
+ - 127.0.0.1:9844:9844
logging:
options:
max-size: "1m"
.envdiffbeforeafterboth--- a/.env
+++ b/.env
@@ -2,26 +2,25 @@
POLKADOT_BUILD_BRANCH=release-v0.9.29
POLKADOT_MAINNET_BRANCH=release-v0.9.26
+STATEMINT_BUILD_BRANCH=release-parachains-v9230
+ACALA_BUILD_BRANCH=2.9.2
+MOONBEAM_BUILD_BRANCH=runtime-1701
+
UNIQUE_MAINNET_TAG=v924010
+UNIQUE_REPLICA_FROM=wss://eu-ws.unique.network:443
KUSAMA_MAINNET_BRANCH=release-v0.9.26
+STATEMINE_BUILD_BRANCH=parachains-v9270
+KARURA_BUILD_BRANCH=2.9.1
+MOONRIVER_BUILD_BRANCH=runtime-1701
+
QUARTZ_MAINNET_TAG=quartz-v924012-2
+QUARTZ_REPLICA_FROM=wss://eu-ws-quartz.unique.network:443
UNQWND_MAINNET_BRANCH=release-v0.9.24
+WESTMINT_BUILD_BRANCH=parachains-v9270
+OPAL_MAINNET_TAG=v924010
OPAL_REPLICA_FROM=wss://eu-ws-opal.unique.network:443
-QUARTZ_REPLICA_FROM=wss://eu-ws-quartz.unique.network:443
-UNIQUE_REPLICA_FROM=wss://eu-ws.unique.network:443
POLKADOT_LAUNCH_BRANCH=unique-network
-
-KARURA_BUILD_BRANCH=2.9.1
-ACALA_BUILD_BRANCH=2.9.2
-
-MOONRIVER_BUILD_BRANCH=runtime-1701
-MOONBEAM_BUILD_BRANCH=runtime-1701
-
-STATEMINE_BUILD_BRANCH=parachains-v9270
-STATEMINT_BUILD_BRANCH=release-parachains-v9230
-WESTMINT_BUILD_BRANCH=parachains-v9270
-
.github/workflows/forkless-update-nodata_v2.ymldiffbeforeafterboth--- a/.github/workflows/forkless-update-nodata_v2.yml
+++ b/.github/workflows/forkless-update-nodata_v2.yml
@@ -33,7 +33,7 @@
uses: xom9ikk/dotenv@v1.0.2
- name: Create Execution matrix
- uses: fabiocaccamo/create-matrix-action@v2
+ uses: CertainLach/create-matrix-action@v3
id: create_matrix
with:
matrix: |
@@ -161,6 +161,50 @@
- name: Show docker logs
if: success() || failure()
run: cat './forkless-parachain-upgrade-nodata-logs.${{ matrix.features }}/node-parachain.log'
+
+ - name: Run Parellel tests
+ working-directory: tests
+ run: |
+ yarn install
+ yarn add mochawesome
+ node scripts/readyness.js
+ echo "Ready to start tests"
+ yarn polkadot-types
+ NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
+ env:
+ RPC_URL: http://127.0.0.1:9933/
+
+ - name: Test Report Parallel
+ uses: phoenix-actions/test-reporting@v8
+ id: test-report-parallel
+ if: success() || failure() # run this step even if previous step failed
+ with:
+ name: Report Parallel tests results - ${{ matrix.network }} # Name of the check run which will be created
+ path: tests/mochawesome-report/test-parallel-*.json # Path to test results
+ reporter: mochawesome-json
+ fail-on-error: 'false'
+
+ - name: Run Sequential tests
+ working-directory: tests
+ run: |
+ yarn install
+ yarn add mochawesome
+ node scripts/readyness.js
+ echo "Ready to start tests"
+ yarn polkadot-types
+ NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
+ env:
+ RPC_URL: http://127.0.0.1:9933/
+
+ - name: Test Report Sequential
+ uses: phoenix-actions/test-reporting@v8
+ id: test-report-sequential
+ if: success() || failure() # run this step even if previous step failed
+ with:
+ name: Report Sequential tests results - ${{ matrix.network }} # Name of the check run which will be created
+ path: tests/mochawesome-report/test-sequential-*.json # Path to test results
+ reporter: mochawesome-json
+ fail-on-error: 'false'
- name: Stop running containers
if: always() # run this step always
.github/workflows/market-test_v2.ymldiffbeforeafterboth--- a/.github/workflows/market-test_v2.yml
+++ b/.github/workflows/market-test_v2.yml
@@ -11,7 +11,7 @@
market_test:
# The type of runner that the job will run on
runs-on: [self-hosted-ci,large]
- timeout-minutes: 1380
+ timeout-minutes: 360
name: ${{ matrix.network }}
.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