difftreelog
Update node-only-update_v3.yml
in: master
1 file changed
.github/workflows/node-only-update_v3.ymldiffbeforeafterboth1name: Parallele tests23# Controls when the action will run.4on:5 workflow_call:6#Define Workflow variables78# A workflow run is made up of one or more jobs that can run sequentially or in parallel9jobs:1011 nodes-execution-matrix:1213 name: execution matrix1415 runs-on: self-hosted-ci16 outputs:17 matrix: ${{ steps.create_matrix.outputs.matrix }}1819 steps:2021 - name: Clean Workspace22 uses: AutoModality/action-clean@v1.1.02324 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it25 - uses: actions/checkout@v326 with:27 ref: ${{ github.head_ref }} #Checking out head commit2829 - name: Read .env file30 uses: xom9ikk/dotenv@v1.0.23132 - name: Create Execution matrix33 uses: fabiocaccamo/create-matrix-action@v234 id: create_matrix35 with:36 matrix: |37 network {opal}, runtime {opal}, features {opal-runtime}, mainnet_branch {${{ env.OPAL_MAINNET_TAG }}}38 network {quartz}, runtime {quartz}, features {quartz-runtime}, mainnet_branch {${{ env.QUARTZ_MAINNET_TAG }}}39 network {unique}, runtime {unique}, features {unique-runtime}, mainnet_branch {${{ env.UNIQUE_MAINNET_TAG }}}40 41 parallel-test:42 needs: nodes-execution-matrix43 # The type of runner that the job will run on44 runs-on: [self-hosted-ci,large]45464748 timeout-minutes: 13804950 name: ${{ matrix.network }} - parallel5152 continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false.5354 strategy:55 matrix:56 include: ${{fromJson(needs.nodes-execution-matrix.outputs.matrix)}}5758 steps:5960 - name: Clean Workspace61 uses: AutoModality/action-clean@v1.1.06263 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it64 - uses: actions/checkout@v365 with:66 ref: ${{ github.head_ref }} #Checking out head commit6768 - name: Read .env file69 uses: xom9ikk/dotenv@v1.0.27071 - name: Generate ENV related extend file for docker-compose72 uses: cuchi/jinja2-action@v1.2.073 with:74 template: .docker/docker-compose.tmp-node.j275 output_file: .docker/docker-compose.node.${{ matrix.network }}.yml76 variables: |77 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git78 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}79 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}80 POLKADOT_MAINNET_BRANCH=${{ env.POLKADOT_MAINNET_BRANCH }}81 MAINNET_TAG=${{ matrix.mainnet_tag }}82 MAINNET_BRANCH=${{ matrix.mainnet_branch }}83 FEATURE=${{ matrix.features }}84 RUNTIME=${{ matrix.runtime }}85 BRANCH=${{ github.head_ref }}86 87 - name: Show build configuration88 run: cat .docker/docker-compose.node.${{ matrix.network }}.yml8990 - name: Generate launch-config-forkless-nodata.json91 uses: cuchi/jinja2-action@v1.2.092 with:93 template: .docker/forkless-config/launch-config-node-update-only-v3.j294 output_file: .docker/launch-config-forkless-nodata.json95 variables: |96 FEATURE=${{ matrix.features }}97 RUNTIME=${{ matrix.runtime }}98 99 - name: Show launch-config-forkless configuration100 run: cat .docker/launch-config-forkless-nodata.json101102 - uses: actions/setup-node@v3103 with:104 node-version: 16105106 - name: Build the stack107 run: docker-compose -f ".docker/docker-compose-forkless.yml" -f ".docker/docker-compose.node.${{ matrix.network }}.yml" up -d --build --remove-orphans --force-recreate --timeout 300108109 # π POLKADOT LAUNCH COMPLETE π110 - name: Check if docker logs consist messages related to testing of Node Parachain Upgrade.111 if: success()112 run: |113 counter=160114 function check_container_status {115 docker inspect -f {{.State.Running}} node-parachain116 }117 function do_docker_logs {118 docker logs --details node-parachain 2>&1119 }120 function is_started {121 if [ "$(check_container_status)" == "true" ]; then122 echo "Container: node-parachain RUNNING";123 echo "Check Docker logs"124 DOCKER_LOGS=$(do_docker_logs)125 if [[ ${DOCKER_LOGS} = *"POLKADOT LAUNCH COMPLETE"* ]];then126 echo "π POLKADOT LAUNCH COMPLETE π"127 return 0128 else129 echo "Message not found in logs output, repeating..."130 return 1131 fi132 else133 echo "Container node-parachain NOT RUNNING"134 echo "Halting all future checks"135 exit 1136 fi137 echo "something goes wrong"138 exit 1139 }140 while ! is_started; do141 echo "Waiting for special message in log files "142 sleep 30s143 counter=$(( $counter - 1 ))144 echo "Counter: $counter"145 if [ "$counter" -gt "0" ]; then146 continue147 else148 break149 fi150 done151 echo "Halting script"152 exit 0153 shell: bash154155 - name: Run Parallel tests on Node Parachain156 working-directory: ${{ matrix.mainnet_branch }}/tests157 run: |158 yarn install159 yarn add mochawesome160 echo "Ready to start tests"161 yarn polkadot-types162 NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}163 env:164 RPC_URL: http://127.0.0.1:9933/165166 - name: Parallel Tests report167 uses: phoenix-actions/test-reporting@v8168 id: test-report-parallel169 if: success() || failure() # run this step even if previous step failed170 with:171 name: Parallel Tests report - ${{ matrix.network }} # Name of the check run which will be created172 path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-parallel-*.json # Path to test results173 reporter: mochawesome-json174 fail-on-error: 'false'175 176 - name: Run Sequential tests on Node Parachain177 working-directory: ${{ matrix.mainnet_branch }}/tests178 run: |179 yarn install180 yarn add mochawesome181 echo "Ready to start tests"182 yarn polkadot-types183 NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}184 env:185 RPC_URL: http://127.0.0.1:9933/186187 - name: Sequential Tests report188 uses: phoenix-actions/test-reporting@v8189 id: test-report-sequential190 if: success() || failure() # run this step even if previous step failed191 with:192 name: Parallel Tests report - ${{ matrix.network }} # Name of the check run which will be created193 path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-sequential-*.json # Path to test results194 reporter: mochawesome-json195 fail-on-error: 'false'196 197 - name: Stop running containers198 if: always() # run this step always199 run: docker-compose -f ".docker/docker-compose-forkless.yml" -f ".docker/docker-compose.node.${{ matrix.network }}.yml" down --volumes200201 - name: Remove builder cache202 if: always() # run this step always203 run: |204 docker builder prune -f -a205 docker system prune -f206 docker image prune -f -a207 208 - name: List files in Workspace209 if: always()210 run: ls -la ./211212 sequential-test:213 needs: nodes-execution-matrix214 # The type of runner that the job will run on215 runs-on: [self-hosted-ci,large]216217218219 timeout-minutes: 1380220221 name: ${{ matrix.network }} - sequential222223 continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false.224225 strategy:226 matrix:227 include: ${{fromJson(needs.nodes-execution-matrix.outputs.matrix)}}228229 steps:230231 - name: Clean Workspace232 uses: AutoModality/action-clean@v1.1.0233234 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it235 - uses: actions/checkout@v3236 with:237 ref: ${{ github.head_ref }} #Checking out head commit238239 - name: Read .env file240 uses: xom9ikk/dotenv@v1.0.2241242 - name: Generate ENV related extend file for docker-compose243 uses: cuchi/jinja2-action@v1.2.0244 with:245 template: .docker/docker-compose.tmp-node.j2246 output_file: .docker/docker-compose.node.${{ matrix.network }}.yml247 variables: |248 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git249 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}250 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}251 POLKADOT_MAINNET_BRANCH=${{ env.POLKADOT_MAINNET_BRANCH }}252 MAINNET_TAG=${{ matrix.mainnet_tag }}253 MAINNET_BRANCH=${{ matrix.mainnet_branch }}254 FEATURE=${{ matrix.features }}255 RUNTIME=${{ matrix.runtime }}256 BRANCH=${{ github.head_ref }}257 258 - name: Show build configuration259 run: cat .docker/docker-compose.node.${{ matrix.network }}.yml260261 - name: Generate launch-config-forkless-nodata.json262 uses: cuchi/jinja2-action@v1.2.0263 with:264 template: .docker/forkless-config/launch-config-node-update-only-v3.j2265 output_file: .docker/launch-config-forkless-nodata.json266 variables: |267 FEATURE=${{ matrix.features }}268 RUNTIME=${{ matrix.runtime }}269 270 - name: Show launch-config-forkless configuration271 run: cat .docker/launch-config-forkless-nodata.json272273 - uses: actions/setup-node@v3274 with:275 node-version: 16276277 - name: Build the stack278 run: docker-compose -f ".docker/docker-compose-forkless.yml" -f ".docker/docker-compose.node.${{ matrix.network }}.yml" up -d --build --remove-orphans --force-recreate --timeout 300279280 # π POLKADOT LAUNCH COMPLETE π281 - name: Check if docker logs consist messages related to testing of Node Parachain Upgrade.282 if: success()283 run: |284 counter=160285 function check_container_status {286 docker inspect -f {{.State.Running}} node-parachain287 }288 function do_docker_logs {289 docker logs --details node-parachain 2>&1290 }291 function is_started {292 if [ "$(check_container_status)" == "true" ]; then293 echo "Container: node-parachain RUNNING";294 echo "Check Docker logs"295 DOCKER_LOGS=$(do_docker_logs)296 if [[ ${DOCKER_LOGS} = *"POLKADOT LAUNCH COMPLETE"* ]];then297 echo "π POLKADOT LAUNCH COMPLETE π"298 return 0299 else300 echo "Message not found in logs output, repeating..."301 return 1302 fi303 else304 echo "Container node-parachain NOT RUNNING"305 echo "Halting all future checks"306 exit 1307 fi308 echo "something goes wrong"309 exit 1310 }311 while ! is_started; do312 echo "Waiting for special message in log files "313 sleep 30s314 counter=$(( $counter - 1 ))315 echo "Counter: $counter"316 if [ "$counter" -gt "0" ]; then317 continue318 else319 break320 fi321 done322 echo "Halting script"323 exit 0324 shell: bash325326 - name: Run Sequential tests on Node Parachain327 working-directory: ${{ matrix.mainnet_branch }}/tests328 run: |329 yarn install330 yarn add mochawesome331 echo "Ready to start tests"332 yarn polkadot-types333 NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}334 env:335 RPC_URL: http://127.0.0.1:9933/336337 - name: Sequential Tests report338 uses: phoenix-actions/test-reporting@v8339 id: test-report-sequential340 if: success() || failure() # run this step even if previous step failed341 with:342 name: Parallel Tests report - ${{ matrix.network }} # Name of the check run which will be created343 path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-sequential-*.json # Path to test results344 reporter: mochawesome-json345 fail-on-error: 'false'346 347 - name: Stop running containers348 if: always() # run this step always349 run: docker-compose -f ".docker/docker-compose-forkless.yml" -f ".docker/docker-compose.node.${{ matrix.network }}.yml" down --volumes350351 - name: Remove builder cache352 if: always() # run this step always353 run: |354 docker builder prune -f -a355 docker system prune -f356 docker image prune -f -a357 358 - name: List files in Workspace359 if: always()360 run: ls -la ./1name: Parallele tests23# Controls when the action will run.4on:5 workflow_call:6#Define Workflow variables78# A workflow run is made up of one or more jobs that can run sequentially or in parallel9jobs:1011 nodes-execution-matrix:1213 name: execution matrix1415 runs-on: self-hosted-ci16 outputs:17 matrix: ${{ steps.create_matrix.outputs.matrix }}1819 steps:2021 - name: Clean Workspace22 uses: AutoModality/action-clean@v1.1.02324 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it25 - uses: actions/checkout@v326 with:27 ref: ${{ github.head_ref }} #Checking out head commit2829 - name: Read .env file30 uses: xom9ikk/dotenv@v1.0.23132 - name: Create Execution matrix33 uses: fabiocaccamo/create-matrix-action@v234 id: create_matrix35 with:36 matrix: |37 network {opal}, runtime {opal}, features {opal-runtime}, mainnet_branch {${{ env.OPAL_MAINNET_TAG }}}38 network {quartz}, runtime {quartz}, features {quartz-runtime}, mainnet_branch {${{ env.QUARTZ_MAINNET_TAG }}}39 network {unique}, runtime {unique}, features {unique-runtime}, mainnet_branch {${{ env.UNIQUE_MAINNET_TAG }}}40 41 parallel-test:42 needs: nodes-execution-matrix43 # The type of runner that the job will run on44 runs-on: [self-hosted-ci,large]45464748 timeout-minutes: 13804950 name: ${{ matrix.network }} - parallel5152 continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false.5354 strategy:55 matrix:56 include: ${{fromJson(needs.nodes-execution-matrix.outputs.matrix)}}5758 steps:5960 - name: Clean Workspace61 uses: AutoModality/action-clean@v1.1.06263 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it64 - uses: actions/checkout@v365 with:66 ref: ${{ github.head_ref }} #Checking out head commit6768 - name: Read .env file69 uses: xom9ikk/dotenv@v1.0.27071 - name: Generate ENV related extend file for docker-compose72 uses: cuchi/jinja2-action@v1.2.073 with:74 template: .docker/docker-compose.tmp-node.j275 output_file: .docker/docker-compose.node.${{ matrix.network }}.yml76 variables: |77 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git78 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}79 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}80 POLKADOT_MAINNET_BRANCH=${{ env.POLKADOT_MAINNET_BRANCH }}81 MAINNET_TAG=${{ matrix.mainnet_tag }}82 MAINNET_BRANCH=${{ matrix.mainnet_branch }}83 FEATURE=${{ matrix.features }}84 RUNTIME=${{ matrix.runtime }}85 BRANCH=${{ github.head_ref }}86 87 - name: Show build configuration88 run: cat .docker/docker-compose.node.${{ matrix.network }}.yml8990 - name: Generate launch-config-forkless-nodata.json91 uses: cuchi/jinja2-action@v1.2.092 with:93 template: .docker/forkless-config/launch-config-node-update-only-v3.j294 output_file: .docker/launch-config-forkless-nodata.json95 variables: |96 FEATURE=${{ matrix.features }}97 RUNTIME=${{ matrix.runtime }}98 99 - name: Show launch-config-forkless configuration100 run: cat .docker/launch-config-forkless-nodata.json101102 - uses: actions/setup-node@v3103 with:104 node-version: 16105106 - name: Build the stack107 run: docker-compose -f ".docker/docker-compose-forkless.yml" -f ".docker/docker-compose.node.${{ matrix.network }}.yml" up -d --build --remove-orphans --force-recreate --timeout 300108109 # π POLKADOT LAUNCH COMPLETE π110 - name: Check if docker logs consist messages related to testing of Node Parachain Upgrade.111 if: success()112 run: |113 counter=160114 function check_container_status {115 docker inspect -f {{.State.Running}} node-parachain116 }117 function do_docker_logs {118 docker logs --details node-parachain 2>&1119 }120 function is_started {121 if [ "$(check_container_status)" == "true" ]; then122 echo "Container: node-parachain RUNNING";123 echo "Check Docker logs"124 DOCKER_LOGS=$(do_docker_logs)125 if [[ ${DOCKER_LOGS} = *"POLKADOT LAUNCH COMPLETE"* ]];then126 echo "π POLKADOT LAUNCH COMPLETE π"127 return 0128 else129 echo "Message not found in logs output, repeating..."130 return 1131 fi132 else133 echo "Container node-parachain NOT RUNNING"134 echo "Halting all future checks"135 exit 1136 fi137 echo "something goes wrong"138 exit 1139 }140 while ! is_started; do141 echo "Waiting for special message in log files "142 sleep 30s143 counter=$(( $counter - 1 ))144 echo "Counter: $counter"145 if [ "$counter" -gt "0" ]; then146 continue147 else148 break149 fi150 done151 echo "Halting script"152 exit 0153 shell: bash154155 - name: Run Parallel tests on Node Parachain156 working-directory: tests157 run: |158 yarn install159 yarn add mochawesome160 echo "Ready to start tests"161 yarn polkadot-types162 NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}163 env:164 RPC_URL: http://127.0.0.1:9933/165166 - name: Parallel Tests report167 uses: phoenix-actions/test-reporting@v8168 id: test-report-parallel169 if: success() || failure() # run this step even if previous step failed170 with:171 name: Parallel Tests report - ${{ matrix.network }} # Name of the check run which will be created172 path: tests/mochawesome-report/test-parallel-*.json # Path to test results173 reporter: mochawesome-json174 fail-on-error: 'false'175 176 177 - name: Stop running containers178 if: always() # run this step always179 run: docker-compose -f ".docker/docker-compose-forkless.yml" -f ".docker/docker-compose.node.${{ matrix.network }}.yml" down --volumes180181 - name: Remove builder cache182 if: always() # run this step always183 run: |184 docker builder prune -f -a185 docker system prune -f186 docker image prune -f -a187 188 - name: List files in Workspace189 if: always()190 run: ls -la ./191192 sequential-test:193 needs: nodes-execution-matrix194 # The type of runner that the job will run on195 runs-on: [self-hosted-ci,large]196197198199 timeout-minutes: 1380200201 name: ${{ matrix.network }} - sequential202203 continue-on-error: true #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false.204205 strategy:206 matrix:207 include: ${{fromJson(needs.nodes-execution-matrix.outputs.matrix)}}208209 steps:210211 - name: Clean Workspace212 uses: AutoModality/action-clean@v1.1.0213214 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it215 - uses: actions/checkout@v3216 with:217 ref: ${{ github.head_ref }} #Checking out head commit218219 - name: Read .env file220 uses: xom9ikk/dotenv@v1.0.2221222 - name: Generate ENV related extend file for docker-compose223 uses: cuchi/jinja2-action@v1.2.0224 with:225 template: .docker/docker-compose.tmp-node.j2226 output_file: .docker/docker-compose.node.${{ matrix.network }}.yml227 variables: |228 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git229 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}230 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}231 POLKADOT_MAINNET_BRANCH=${{ env.POLKADOT_MAINNET_BRANCH }}232 MAINNET_TAG=${{ matrix.mainnet_tag }}233 MAINNET_BRANCH=${{ matrix.mainnet_branch }}234 FEATURE=${{ matrix.features }}235 RUNTIME=${{ matrix.runtime }}236 BRANCH=${{ github.head_ref }}237 238 - name: Show build configuration239 run: cat .docker/docker-compose.node.${{ matrix.network }}.yml240241 - name: Generate launch-config-forkless-nodata.json242 uses: cuchi/jinja2-action@v1.2.0243 with:244 template: .docker/forkless-config/launch-config-node-update-only-v3.j2245 output_file: .docker/launch-config-forkless-nodata.json246 variables: |247 FEATURE=${{ matrix.features }}248 RUNTIME=${{ matrix.runtime }}249 250 - name: Show launch-config-forkless configuration251 run: cat .docker/launch-config-forkless-nodata.json252253 - uses: actions/setup-node@v3254 with:255 node-version: 16256257 - name: Build the stack258 run: docker-compose -f ".docker/docker-compose-forkless.yml" -f ".docker/docker-compose.node.${{ matrix.network }}.yml" up -d --build --remove-orphans --force-recreate --timeout 300259260 # π POLKADOT LAUNCH COMPLETE π261 - name: Check if docker logs consist messages related to testing of Node Parachain Upgrade.262 if: success()263 run: |264 counter=160265 function check_container_status {266 docker inspect -f {{.State.Running}} node-parachain267 }268 function do_docker_logs {269 docker logs --details node-parachain 2>&1270 }271 function is_started {272 if [ "$(check_container_status)" == "true" ]; then273 echo "Container: node-parachain RUNNING";274 echo "Check Docker logs"275 DOCKER_LOGS=$(do_docker_logs)276 if [[ ${DOCKER_LOGS} = *"POLKADOT LAUNCH COMPLETE"* ]];then277 echo "π POLKADOT LAUNCH COMPLETE π"278 return 0279 else280 echo "Message not found in logs output, repeating..."281 return 1282 fi283 else284 echo "Container node-parachain NOT RUNNING"285 echo "Halting all future checks"286 exit 1287 fi288 echo "something goes wrong"289 exit 1290 }291 while ! is_started; do292 echo "Waiting for special message in log files "293 sleep 30s294 counter=$(( $counter - 1 ))295 echo "Counter: $counter"296 if [ "$counter" -gt "0" ]; then297 continue298 else299 break300 fi301 done302 echo "Halting script"303 exit 0304 shell: bash305306 - name: Run Sequential tests on Node Parachain307 working-directory: tests308 run: |309 yarn install310 yarn add mochawesome311 echo "Ready to start tests"312 yarn polkadot-types313 NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}314 env:315 RPC_URL: http://127.0.0.1:9933/316317 - name: Sequential Tests report318 uses: phoenix-actions/test-reporting@v8319 id: test-report-sequential320 if: success() || failure() # run this step even if previous step failed321 with:322 name: Parallel Tests report - ${{ matrix.network }} # Name of the check run which will be created323 path: tests/mochawesome-report/test-sequential-*.json # Path to test results324 reporter: mochawesome-json325 fail-on-error: 'false'326 327 - name: Stop running containers328 if: always() # run this step always329 run: docker-compose -f ".docker/docker-compose-forkless.yml" -f ".docker/docker-compose.node.${{ matrix.network }}.yml" down --volumes330331 - name: Remove builder cache332 if: always() # run this step always333 run: |334 docker builder prune -f -a335 docker system prune -f336 docker image prune -f -a337 338 - name: List files in Workspace339 if: always()340 run: ls -la ./