1name: nodes-only update234on:5 workflow_call:6789jobs: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 25 - uses: actions/checkout@v326 with:27 ref: ${{ github.head_ref }} 2829 - 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.QUARTZ_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 nodes-only-update:42 needs: nodes-execution-matrix43 44 runs-on: [self-hosted-ci,large]45464748 timeout-minutes: 13804950 name: ${{ matrix.network }}5152 continue-on-error: true 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 64 - uses: actions/checkout@v365 with:66 ref: ${{ github.head_ref }} 6768 - 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 - name: Show build configuration87 run: cat .docker/docker-compose.node.${{ matrix.network }}.yml8889 - name: Generate launch-config-forkless-nodata.json90 uses: cuchi/jinja2-action@v1.2.091 with:92 template: .docker/forkless-config/launch-config-forkless-nodata.j293 output_file: .docker/launch-config-forkless-nodata.json94 variables: |95 FEATURE=${{ matrix.features }}96 RUNTIME=${{ matrix.runtime }}97 98 - name: Show launch-config-forkless configuration99 run: cat .docker/launch-config-forkless-nodata.json100101 - uses: actions/setup-node@v3102 with:103 node-version: 16104105 - name: Build the stack106 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 300107108 109 - name: Check if docker logs consist messages related to testing of Node Parachain Upgrade.110 if: success()111 run: |112 counter=160113 function check_container_status {114 docker inspect -f {{.State.Running}} node-parachain115 }116 function do_docker_logs {117 docker logs --details node-parachain 2>&1118 }119 function is_started {120 if [ "$(check_container_status)" == "true" ]; then121 echo "Container: node-parachain RUNNING";122 echo "Check Docker logs"123 DOCKER_LOGS=$(do_docker_logs)124 if [[ ${DOCKER_LOGS} = *"POLKADOT LAUNCH COMPLETE"* ]];then125 echo "🚀 POLKADOT LAUNCH COMPLETE 🚀"126 return 0127 else128 echo "Message not found in logs output, repeating..."129 return 1130 fi131 else132 echo "Container node-parachain NOT RUNNING"133 echo "Halting all future checks"134 exit 1135 fi136 echo "something goes wrong"137 exit 1138 }139 while ! is_started; do140 echo "Waiting for special message in log files "141 sleep 30s142 counter=$(( $counter - 1 ))143 echo "Counter: $counter"144 if [ "$counter" -gt "0" ]; then145 continue146 else147 break148 fi149 done150 echo "Halting script"151 exit 0152 shell: bash153154 - name: Run Parallel tests on Node Parachain155 working-directory: ${{ matrix.mainnet_branch }}/tests156 run: |157 yarn install158 yarn add mochawesome159 echo "Ready to start tests"160 yarn polkadot-types161 NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}162 env:163 RPC_URL: http://127.0.0.1:9933/164165 - name: Parallel Tests report166 uses: phoenix-actions/test-reporting@v8167 id: test-report-parallel168 if: success() || failure() 169 with:170 name: Parallel Tests report - ${{ matrix.network }} 171 path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-parallel-*.json 172 reporter: mochawesome-json173 fail-on-error: 'false'174 175 - name: Stop running containers176 if: always() 177 run: docker-compose -f ".docker/docker-compose-forkless.yml" -f ".docker/docker-compose.node.${{ matrix.network }}.yml" down --volumes178179 - name: Remove builder cache180 if: always() 181 run: |182 docker builder prune -f -a183 docker system prune -f184 docker image prune -f -a185 186 - name: List files in Workspace187 if: always()188 uses: |189 ls -la ./