difftreelog
change trugger for xcm-tests
in: master
1 file changed
.github/workflows/xcm-tests.ymldiffbeforeafterboth1name: xcm-tests23# Controls when the action will run.4on:5 # Triggers the workflow after xcm-testnet-build 6 workflow_run:7 workflows: ["xcm-testnet-build"]8 types: [requested] 9 # Triggers the workflow on push or pull request events but only for the master branch10 pull_request:11 branches:12 - master13 types:14 - opened15 - reopened16 - synchronize #commit(s) pushed to the pull request17 - ready_for_review1819 # Allows you to run this workflow manually from the Actions tab20 workflow_dispatch:2122#Define Workflow variables23env:24 REPO_URL: ${{ github.server_url }}/${{ github.repository }}2526concurrency:27 group: ${{ github.workflow }}-${{ github.head_ref }}28 cancel-in-progress: true2930# A workflow run is made up of one or more jobs that can run sequentially or in parallel31jobs:3233 prepare-execution-marix:3435 name: Prepare execution matrix3637 runs-on: XL38 outputs:39 matrix: ${{ steps.create_matrix.outputs.matrix }}4041 steps:4243 - name: Clean Workspace44 uses: AutoModality/action-clean@v1.1.04546 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it47 - uses: actions/checkout@v348 with:49 ref: ${{ github.head_ref }} #Checking out head commit5051 - name: Read .env file52 uses: xom9ikk/dotenv@v1.0.25354 - name: Create Execution matrix55 uses: fabiocaccamo/create-matrix-action@v256 id: create_matrix57 with:58 matrix: |59 network {opal}, runtime {opal}, features {opal-runtime}, runtest {testXcmOpal}60 network {quartz}, runtime {quartz}, features {quartz-runtime}, runtest {testXcmQuartz}61 network {unique}, runtime {unique}, features {unique-runtime}, runtest {testXcmUnique}6263 xcm-tests:64 needs: prepare-execution-marix65 # The type of runner that the job will run on66 runs-on: [XL]6768 timeout-minutes: 6006970 name: ${{ matrix.network }}7172 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.7374 strategy:75 matrix:76 include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}777879 steps:80 # - name: Skip if pull request is in Draft81 # if: github.event.pull_request.draft == true82 # run: exit 18384 - name: Clean Workspace85 uses: AutoModality/action-clean@v1.1.08687 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it88 - uses: actions/checkout@v389 with:90 ref: ${{ github.head_ref }} #Checking out head commit9192 - name: Read .env file93 uses: xom9ikk/dotenv@v1.0.29495 - name: Generate ENV related extend file for docker-compose96 uses: cuchi/jinja2-action@v1.2.097 with:98 template: .docker/docker-compose.tmp-xcm-tests.j299 output_file: .docker/docker-compose.xcm-tests.${{ matrix.network }}.yml100 variables: |101 NETWORK=${{ matrix.network }}102103 - name: Show build configuration104 run: cat .docker/docker-compose.xcm-tests.${{ matrix.network }}.yml105106 - uses: actions/setup-node@v3107 with:108 node-version: 16109110 - name: Build the stack111 run: docker-compose -f ".docker/docker-compose.xcm-tests.${{ matrix.network }}.yml" up -d --remove-orphans --force-recreate --timeout 300112113 # π POLKADOT LAUNCH COMPLETE π114 - name: Check if docker logs consist messages related to testing of xcm tests 115 if: success()116 run: |117 counter=160118 function check_container_status {119 docker inspect -f {{.State.Running}} xcm-${{ matrix.network }}-testnet-local120 }121 function do_docker_logs {122 docker logs --details xcm-${{ matrix.network }}-testnet-local 2>&1123 }124 function is_started {125 if [ "$(check_container_status)" == "true" ]; then126 echo "Container: xcm-${{ matrix.network }}-testnet-local RUNNING";127 echo "Check Docker logs"128 DOCKER_LOGS=$(do_docker_logs)129 if [[ ${DOCKER_LOGS} = *"POLKADOT LAUNCH COMPLETE"* ]];then130 echo "π POLKADOT LAUNCH COMPLETE π"131 return 0132 else133 echo "Message not found in logs output, repeating..."134 return 1135 fi136 else137 echo "Container xcm-${{ matrix.network }}-testnet-local NOT RUNNING"138 echo "Halting all future checks"139 exit 1140 fi141 echo "something goes wrong"142 exit 1143 }144 while ! is_started; do145 echo "Waiting for special message in log files "146 sleep 30s147 counter=$(( $counter - 1 ))148 echo "Counter: $counter"149 if [ "$counter" -gt "0" ]; then150 continue151 else152 break153 fi154 done155 echo "Halting script"156 exit 0157 shell: bash158159 - name: Run XCM tests 160 working-directory: tests161 run: |162 yarn install163 yarn add mochawesome164 echo "Ready to start tests"165 NOW=$(date +%s) && yarn ${{ matrix.runtest }} --reporter mochawesome --reporter-options reportFilename=test-${NOW}166167 - name: XCM Test Report168 uses: phoenix-actions/test-reporting@v8169 id: test-report170 if: success() || failure() # run this step even if previous step failed171 with:172 name: XCM Tests ${{ matrix.network }} # Name of the check run which will be created173 path: tests/mochawesome-report/test-*.json # Path to test results174 reporter: mochawesome-json175 fail-on-error: 'false'176177 - name: Stop running containers178 if: always() # run this step always179 run: docker-compose -f ".docker/docker-compose.xcm-tests.${{ matrix.network }}.yml" down180181 - name: Clean Workspace182 if: always()183 uses: AutoModality/action-clean@v1.1.0184185 - name: Remove builder cache186 if: always() # run this step always187 run: |188 docker system prune -a -f1891name: xcm-tests23# Controls when the action will run.4on:5 # Triggers the workflow after xcm-testnet-build 6 workflow_run:7 workflows: ["xcm-testnet-build"]8 types: 9 - completed 10 # Triggers the workflow on push or pull request events but only for the master branch11 pull_request:12 branches:13 - master14 types:15 - opened16 - reopened17 - synchronize #commit(s) pushed to the pull request18 - ready_for_review1920 # Allows you to run this workflow manually from the Actions tab21 workflow_dispatch:2223#Define Workflow variables24env:25 REPO_URL: ${{ github.server_url }}/${{ github.repository }}2627concurrency:28 group: ${{ github.workflow }}-${{ github.head_ref }}29 cancel-in-progress: true3031# A workflow run is made up of one or more jobs that can run sequentially or in parallel32jobs:3334 prepare-execution-marix:3536 name: Prepare execution matrix3738 runs-on: XL39 outputs:40 matrix: ${{ steps.create_matrix.outputs.matrix }}4142 steps:4344 - name: Clean Workspace45 uses: AutoModality/action-clean@v1.1.04647 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it48 - uses: actions/checkout@v349 with:50 ref: ${{ github.head_ref }} #Checking out head commit5152 - name: Read .env file53 uses: xom9ikk/dotenv@v1.0.25455 - name: Create Execution matrix56 uses: fabiocaccamo/create-matrix-action@v257 id: create_matrix58 with:59 matrix: |60 network {opal}, runtime {opal}, features {opal-runtime}, runtest {testXcmOpal}61 network {quartz}, runtime {quartz}, features {quartz-runtime}, runtest {testXcmQuartz}62 network {unique}, runtime {unique}, features {unique-runtime}, runtest {testXcmUnique}6364 xcm-tests:65 needs: prepare-execution-marix66 # The type of runner that the job will run on67 runs-on: [XL]6869 timeout-minutes: 6007071 name: ${{ matrix.network }}7273 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.7475 strategy:76 matrix:77 include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}787980 steps:81 # - name: Skip if pull request is in Draft82 # if: github.event.pull_request.draft == true83 # run: exit 18485 - name: Clean Workspace86 uses: AutoModality/action-clean@v1.1.08788 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it89 - uses: actions/checkout@v390 with:91 ref: ${{ github.head_ref }} #Checking out head commit9293 - name: Read .env file94 uses: xom9ikk/dotenv@v1.0.29596 - name: Generate ENV related extend file for docker-compose97 uses: cuchi/jinja2-action@v1.2.098 with:99 template: .docker/docker-compose.tmp-xcm-tests.j2100 output_file: .docker/docker-compose.xcm-tests.${{ matrix.network }}.yml101 variables: |102 NETWORK=${{ matrix.network }}103104 - name: Show build configuration105 run: cat .docker/docker-compose.xcm-tests.${{ matrix.network }}.yml106107 - uses: actions/setup-node@v3108 with:109 node-version: 16110111 - name: Build the stack112 run: docker-compose -f ".docker/docker-compose.xcm-tests.${{ matrix.network }}.yml" up -d --remove-orphans --force-recreate --timeout 300113114 # π POLKADOT LAUNCH COMPLETE π115 - name: Check if docker logs consist messages related to testing of xcm tests 116 if: success()117 run: |118 counter=160119 function check_container_status {120 docker inspect -f {{.State.Running}} xcm-${{ matrix.network }}-testnet-local121 }122 function do_docker_logs {123 docker logs --details xcm-${{ matrix.network }}-testnet-local 2>&1124 }125 function is_started {126 if [ "$(check_container_status)" == "true" ]; then127 echo "Container: xcm-${{ matrix.network }}-testnet-local RUNNING";128 echo "Check Docker logs"129 DOCKER_LOGS=$(do_docker_logs)130 if [[ ${DOCKER_LOGS} = *"POLKADOT LAUNCH COMPLETE"* ]];then131 echo "π POLKADOT LAUNCH COMPLETE π"132 return 0133 else134 echo "Message not found in logs output, repeating..."135 return 1136 fi137 else138 echo "Container xcm-${{ matrix.network }}-testnet-local NOT RUNNING"139 echo "Halting all future checks"140 exit 1141 fi142 echo "something goes wrong"143 exit 1144 }145 while ! is_started; do146 echo "Waiting for special message in log files "147 sleep 30s148 counter=$(( $counter - 1 ))149 echo "Counter: $counter"150 if [ "$counter" -gt "0" ]; then151 continue152 else153 break154 fi155 done156 echo "Halting script"157 exit 0158 shell: bash159160 - name: Run XCM tests 161 working-directory: tests162 run: |163 yarn install164 yarn add mochawesome165 echo "Ready to start tests"166 NOW=$(date +%s) && yarn ${{ matrix.runtest }} --reporter mochawesome --reporter-options reportFilename=test-${NOW}167168 - name: XCM Test Report169 uses: phoenix-actions/test-reporting@v8170 id: test-report171 if: success() || failure() # run this step even if previous step failed172 with:173 name: XCM Tests ${{ matrix.network }} # Name of the check run which will be created174 path: tests/mochawesome-report/test-*.json # Path to test results175 reporter: mochawesome-json176 fail-on-error: 'false'177178 - name: Stop running containers179 if: always() # run this step always180 run: docker-compose -f ".docker/docker-compose.xcm-tests.${{ matrix.network }}.yml" down181182 - name: Clean Workspace183 if: always()184 uses: AutoModality/action-clean@v1.1.0185186 - name: Remove builder cache187 if: always() # run this step always188 run: |189 docker system prune -a -f190