difftreelog
another trigger for xcm tests workflows
in: master
2 files changed
.github/workflows/xcm-testnet-build.ymldiffbeforeafterboth1name: xcm-testnet-build23# Controls when the action will run.4on:5 # Triggers the workflow on push or pull request events but only for the master branch6 pull_request:7 branches:8 - master9 types:10 - opened11 - reopened12 - synchronize #commit(s) pushed to the pull request13 - ready_for_review1415 # Allows you to run this workflow manually from the Actions tab16 workflow_dispatch:1718#Define Workflow variables19env:20 REPO_URL: ${{ github.server_url }}/${{ github.repository }}2122concurrency:23 group: ${{ github.workflow }}-${{ github.head_ref }}24 cancel-in-progress: true2526# A workflow run is made up of one or more jobs that can run sequentially or in parallel27jobs:2829 prepare-execution-marix:3031 name: Prepare execution matrix3233 runs-on: XL34 outputs:35 matrix: ${{ steps.create_matrix.outputs.matrix }}3637 steps:3839 - name: Clean Workspace40 uses: AutoModality/action-clean@v1.1.04142 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it43 - uses: actions/checkout@v344 with:45 ref: ${{ github.head_ref }} #Checking out head commit4647 - name: Read .env file48 uses: xom9ikk/dotenv@v1.0.24950 - name: Create Execution matrix51 uses: fabiocaccamo/create-matrix-action@v252 id: create_matrix53 with:54 matrix: |55 network {opal}, runtime {opal}, features {opal-runtime}56 network {quartz}, runtime {quartz}, features {quartz-runtime}57 network {unique}, runtime {unique}, features {unique-runtime}5859 xcm-build:60 61 needs: prepare-execution-marix62 # The type of runner that the job will run on63 runs-on: [XL]6465 timeout-minutes: 6006667 name: ${{ matrix.network }}6869 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.7071 strategy:72 matrix:73 include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}747576 steps:77 #- name: Skip if pull request is in Draft78 # if: github.event.pull_request.draft == true79 # run: exit 18081 - name: Clean Workspace82 uses: AutoModality/action-clean@v1.1.08384 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it85 - uses: actions/checkout@v386 with:87 ref: ${{ github.head_ref }} #Checking out head commit8889 - name: Read .env file90 uses: xom9ikk/dotenv@v1.0.29192 - name: Generate ENV related extend Dockerfile file93 uses: cuchi/jinja2-action@v1.2.094 with:95 template: .docker/Dockerfile-xcm.j296 output_file: .docker/Dockerfile-xcm.${{ matrix.network }}.yml97 variables: |98 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}99 NETWORK=${{ matrix.network }}100 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}101 POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}102 FEATURE=${{ matrix.features }}103 RUNTIME=${{ matrix.runtime }}104 BRANCH=${{ github.head_ref }}105 ACALA_BUILD_BRANCH=${{ env.ACALA_BUILD_BRANCH }}106 MOONBEAM_BUILD_BRANCH=${{ env.MOONBEAM_BUILD_BRANCH }}107 CUMULUS_BUILD_BRANCH=${{ env.CUMULUS_BUILD_BRANCH }}108109 - name: Show build Dockerfile110 run: cat .docker/Dockerfile-xcm.${{ matrix.network }}.yml111112 - name: Show launch-config-xcm-${{ matrix.network }} configuration113 run: cat .docker/xcm-config/launch-config-xcm-${{ matrix.network }}.json114115 - name: Run find-and-replace to remove slashes from branch name116 uses: mad9000/actions-find-and-replace-string@2117 id: branchname118 with:119 source: ${{ github.head_ref }}120 find: '/'121 replace: '-'122123 - name: Log in to Docker Hub124 uses: docker/login-action@v2.0.0125 with:126 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}127 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}128129 - name: Pull acala docker image130 run: docker pull uniquenetwork/builder-acala:${{ env.ACALA_BUILD_BRANCH }}131132 - name: Pull moonbeam docker image133 run: docker pull uniquenetwork/builder-moonbeam:${{ env.MOONBEAM_BUILD_BRANCH }}134135 - name: Pull cumulus docker image136 run: docker pull uniquenetwork/builder-cumulus:${{ env.CUMULUS_BUILD_BRANCH }}137138 - name: Pull polkadot docker image139 run: docker pull uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }}140141 - name: Pull chainql docker image142 run: docker pull uniquenetwork/builder-chainql:latest143144 - name: Build the stack145 run: cd .docker/ && docker build --no-cache --file ./Dockerfile-xcm.${{ matrix.network }}.yml --tag uniquenetwork/xcm-${{ matrix.network }}-testnet-local:nightly-${{ steps.branchname.outputs.value }}-${{ github.sha }} --tag uniquenetwork/xcm-${{ matrix.network }}-testnet-local:latest .146147 - name: Push docker image version148 run: docker push uniquenetwork/xcm-${{ matrix.network }}-testnet-local:nightly-${{ steps.branchname.outputs.value }}-${{ github.sha }}149150 - name: Push docker image latest151 run: docker push uniquenetwork/xcm-${{ matrix.network }}-testnet-local:latest152153 - name: Clean Workspace154 if: always()155 uses: AutoModality/action-clean@v1.1.0156157 - name: Remove builder cache158 if: always() # run this step always159 run: |160 docker builder prune -f161 docker system prune -f1621631641name: xcm-testnet-build23# Controls when the action will run.4on:5 workflow_call:6 7 # Allows you to run this workflow manually from the Actions tab8 workflow_dispatch:910#Define Workflow variables11env:12 REPO_URL: ${{ github.server_url }}/${{ github.repository }}1314# A workflow run is made up of one or more jobs that can run sequentially or in parallel15jobs:1617 prepare-execution-marix:1819 name: Prepare execution matrix2021 runs-on: XL22 outputs:23 matrix: ${{ steps.create_matrix.outputs.matrix }}2425 steps:2627 - name: Clean Workspace28 uses: AutoModality/action-clean@v1.1.02930 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it31 - uses: actions/checkout@v332 with:33 ref: ${{ github.head_ref }} #Checking out head commit3435 - name: Read .env file36 uses: xom9ikk/dotenv@v1.0.23738 - name: Create Execution matrix39 uses: fabiocaccamo/create-matrix-action@v240 id: create_matrix41 with:42 matrix: |43 network {opal}, runtime {opal}, features {opal-runtime}44 network {quartz}, runtime {quartz}, features {quartz-runtime}45 network {unique}, runtime {unique}, features {unique-runtime}4647 xcm-build:48 49 needs: prepare-execution-marix50 # The type of runner that the job will run on51 runs-on: [XL]5253 timeout-minutes: 6005455 name: ${{ matrix.network }}5657 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.5859 strategy:60 matrix:61 include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}6263 steps:64 - name: Skip if pull request is in Draft65 if: github.event.pull_request.draft == true66 run: exit 16768 - name: Clean Workspace69 uses: AutoModality/action-clean@v1.1.07071 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it72 - uses: actions/checkout@v373 with:74 ref: ${{ github.head_ref }} #Checking out head commit7576 - name: Read .env file77 uses: xom9ikk/dotenv@v1.0.27879 - name: Generate ENV related extend Dockerfile file80 uses: cuchi/jinja2-action@v1.2.081 with:82 template: .docker/Dockerfile-xcm.j283 output_file: .docker/Dockerfile-xcm.${{ matrix.network }}.yml84 variables: |85 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}86 NETWORK=${{ matrix.network }}87 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}88 POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}89 FEATURE=${{ matrix.features }}90 RUNTIME=${{ matrix.runtime }}91 BRANCH=${{ github.head_ref }}92 ACALA_BUILD_BRANCH=${{ env.ACALA_BUILD_BRANCH }}93 MOONBEAM_BUILD_BRANCH=${{ env.MOONBEAM_BUILD_BRANCH }}94 CUMULUS_BUILD_BRANCH=${{ env.CUMULUS_BUILD_BRANCH }}9596 - name: Show build Dockerfile97 run: cat .docker/Dockerfile-xcm.${{ matrix.network }}.yml9899 - name: Show launch-config-xcm-${{ matrix.network }} configuration100 run: cat .docker/xcm-config/launch-config-xcm-${{ matrix.network }}.json101102 - name: Run find-and-replace to remove slashes from branch name103 uses: mad9000/actions-find-and-replace-string@2104 id: branchname105 with:106 source: ${{ github.head_ref }}107 find: '/'108 replace: '-'109110 - name: Log in to Docker Hub111 uses: docker/login-action@v2.0.0112 with:113 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}114 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}115116 - name: Pull acala docker image117 run: docker pull uniquenetwork/builder-acala:${{ env.ACALA_BUILD_BRANCH }}118119 - name: Pull moonbeam docker image120 run: docker pull uniquenetwork/builder-moonbeam:${{ env.MOONBEAM_BUILD_BRANCH }}121122 - name: Pull cumulus docker image123 run: docker pull uniquenetwork/builder-cumulus:${{ env.CUMULUS_BUILD_BRANCH }}124125 - name: Pull polkadot docker image126 run: docker pull uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }}127128 - name: Pull chainql docker image129 run: docker pull uniquenetwork/builder-chainql:latest130131 - name: Build the stack132 run: cd .docker/ && docker build --no-cache --file ./Dockerfile-xcm.${{ matrix.network }}.yml --tag uniquenetwork/xcm-${{ matrix.network }}-testnet-local:nightly-${{ steps.branchname.outputs.value }}-${{ github.sha }} --tag uniquenetwork/xcm-${{ matrix.network }}-testnet-local:latest .133134 - name: Push docker image version135 run: docker push uniquenetwork/xcm-${{ matrix.network }}-testnet-local:nightly-${{ steps.branchname.outputs.value }}-${{ github.sha }}136137 - name: Push docker image latest138 run: docker push uniquenetwork/xcm-${{ matrix.network }}-testnet-local:latest139140 - name: Clean Workspace141 if: always()142 uses: AutoModality/action-clean@v1.1.0143144 - name: Remove builder cache145 if: always() # run this step always146 run: |147 docker builder prune -f148 docker system prune -f149150151.github/workflows/xcm-tests.ymldiffbeforeafterboth--- a/.github/workflows/xcm-tests.yml
+++ b/.github/workflows/xcm-tests.yml
@@ -2,11 +2,6 @@
# Controls when the action will run.
on:
- # Triggers the workflow after xcm-testnet-build
- workflow_run:
- workflows: ["xcm-testnet-build"]
- types:
- - completed
# Triggers the workflow on push or pull request events but only for the master branch
pull_request:
branches:
@@ -31,10 +26,16 @@
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
+ xcm-testnet-build:
+ uses: ./.github/workflows/xcm-testnet-build.yml
+ secrets: inherit
+
prepare-execution-marix:
name: Prepare execution matrix
+ needs: [xcm-testnet-build]
+
runs-on: XL
outputs:
matrix: ${{ steps.create_matrix.outputs.matrix }}
@@ -78,9 +79,9 @@
steps:
- # - name: Skip if pull request is in Draft
- # if: github.event.pull_request.draft == true
- # run: exit 1
+ - name: Skip if pull request is in Draft
+ if: github.event.pull_request.draft == true
+ run: exit 1
- name: Clean Workspace
uses: AutoModality/action-clean@v1.1.0