difftreelog
Merge branch 'feature/multi-assets-redone' of github.com:UniqueNetwork/unique-chain into feature/multi-assets-redone
in: master
5 files changed
.docker/Dockerfile-xcm.j2diffbeforeafterboth--- a/.docker/Dockerfile-xcm.j2
+++ b/.docker/Dockerfile-xcm.j2
@@ -72,6 +72,7 @@
COPY --from=uniquenetwork/builder-chainql:latest /chainql/target/release/chainql /chainql/target/release/
EXPOSE 9844
+EXPOSE 9933
EXPOSE 9944
EXPOSE 9946
EXPOSE 9947
.docker/docker-compose.tmp-xcm-tests.j2diffbeforeafterboth--- a/.docker/docker-compose.tmp-xcm-tests.j2
+++ b/.docker/docker-compose.tmp-xcm-tests.j2
@@ -6,12 +6,14 @@
container_name: xcm-{{ NETWORK }}-testnet-local
expose:
- 9844
+ - 9933
- 9944
- 9946
- 9947
- 9948
ports:
- 127.0.0.1:9844:9844
+ - 127.0.0.1:9933:9933
- 127.0.0.1:9944:9944
- 127.0.0.1:9946:9946
- 127.0.0.1:9947:9947
.github/workflows/xcm-testnet-build.ymldiffbeforeafterboth--- a/.github/workflows/xcm-testnet-build.yml
+++ /dev/null
@@ -1,151 +0,0 @@
-name: xcm-testnet-build
-
-# Controls when the action will run.
-on:
- workflow_call:
-
- # Allows you to run this workflow manually from the Actions tab
- workflow_dispatch:
-
-#Define Workflow variables
-env:
- REPO_URL: ${{ github.server_url }}/${{ github.repository }}
-
-# A workflow run is made up of one or more jobs that can run sequentially or in parallel
-jobs:
-
- prepare-execution-marix:
-
- name: Prepare execution matrix
-
- runs-on: [XL]
- outputs:
- matrix: ${{ steps.create_matrix.outputs.matrix }}
-
- steps:
-
- - name: Clean Workspace
- uses: AutoModality/action-clean@v1.1.0
-
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v3
- with:
- ref: ${{ github.head_ref }} #Checking out head commit
-
- - name: Read .env file
- uses: xom9ikk/dotenv@v1.0.2
-
- - name: Create Execution matrix
- uses: fabiocaccamo/create-matrix-action@v2
- id: create_matrix
- with:
- matrix: |
- network {opal}, runtime {opal}, features {opal-runtime}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, cumulus_version {${{ env.WESTMINT_BUILD_BRANCH }}}
- network {quartz}, runtime {quartz}, features {quartz-runtime}, acala_version {${{ env.KARURA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONRIVER_BUILD_BRANCH }}}, cumulus_version {${{ env.STATEMINE_BUILD_BRANCH }}}
- network {unique}, runtime {unique}, features {unique-runtime}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, cumulus_version {${{ env.STATEMINT_BUILD_BRANCH }}}
-
- xcm-build:
-
- needs: prepare-execution-marix
- # The type of runner that the job will run on
- runs-on: [XL]
-
- timeout-minutes: 600
-
- name: ${{ matrix.network }}
-
- 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.
-
- strategy:
- matrix:
- include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}
-
- steps:
- - 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
-
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v3
- with:
- ref: ${{ github.head_ref }} #Checking out head commit
-
- - name: Read .env file
- uses: xom9ikk/dotenv@v1.0.2
-
- - name: Generate ENV related extend Dockerfile file
- uses: cuchi/jinja2-action@v1.2.0
- with:
- template: .docker/Dockerfile-xcm.j2
- output_file: .docker/Dockerfile-xcm.${{ matrix.network }}.yml
- variables: |
- RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
- NETWORK=${{ matrix.network }}
- POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}
- POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }}
- FEATURE=${{ matrix.features }}
- RUNTIME=${{ matrix.runtime }}
- BRANCH=${{ github.head_ref }}
- ACALA_BUILD_BRANCH=${{ matrix.acala_version }}
- MOONBEAM_BUILD_BRANCH=${{ matrix.moonbeam_version }}
- CUMULUS_BUILD_BRANCH=${{ matrix.cumulus_version }}
-
- - name: Show build Dockerfile
- run: cat .docker/Dockerfile-xcm.${{ matrix.network }}.yml
-
- - name: Show launch-config-xcm-${{ matrix.network }} configuration
- run: cat .docker/xcm-config/launch-config-xcm-${{ matrix.network }}.json
-
- - name: Run find-and-replace to remove slashes from branch name
- uses: mad9000/actions-find-and-replace-string@2
- id: branchname
- with:
- source: ${{ github.head_ref }}
- find: '/'
- replace: '-'
-
- - name: Log in to Docker Hub
- uses: docker/login-action@v2.0.0
- with:
- username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}
- password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}
-
- - name: Pull acala docker image
- run: docker pull uniquenetwork/builder-acala:${{ matrix.acala_version }}
-
- - name: Pull moonbeam docker image
- run: docker pull uniquenetwork/builder-moonbeam:${{ matrix.moonbeam_version }}
-
- - name: Pull cumulus docker image
- run: docker pull uniquenetwork/builder-cumulus:${{ matrix.cumulus_version }}
-
- - name: Pull polkadot docker image
- run: docker pull uniquenetwork/builder-polkadot:${{ env.POLKADOT_BUILD_BRANCH }}
-
- - name: Pull chainql docker image
- run: docker pull uniquenetwork/builder-chainql:latest
-
- - name: Build the stack
- 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 .
-
- - name: Push docker image version
- run: docker push uniquenetwork/xcm-${{ matrix.network }}-testnet-local:nightly-${{ steps.branchname.outputs.value }}-${{ github.sha }}
-
- - name: Push docker image latest
- run: docker push uniquenetwork/xcm-${{ matrix.network }}-testnet-local:latest
-
- - name: Clean Workspace
- if: always()
- uses: AutoModality/action-clean@v1.1.0
-
- - name: Remove builder cache
- if: always() # run this step always
- run: |
- docker builder prune -f
- docker system prune -f
-
-
-
.github/workflows/xcm-tests_v2.ymldiffbeforeafterboth--- a/.github/workflows/xcm-tests_v2.yml
+++ /dev/null
@@ -1,174 +0,0 @@
-name: xcm-tests
-
-# Controls when the action will run.
-on:
- # Allows you to run this workflow manually from the Actions tab
- workflow_call:
-
-#Define Workflow variables
-env:
- REPO_URL: ${{ github.server_url }}/${{ github.repository }}
-
-
-# A workflow run is made up of one or more jobs that can run sequentially or in parallel
-jobs:
-
- prepare-execution-marix:
-
- name: Prepare execution matrix
-
-# needs: [xcm-testnet-build]
-
- runs-on: XL
- outputs:
- matrix: ${{ steps.create_matrix.outputs.matrix }}
-
- steps:
-
- - name: Clean Workspace
- uses: AutoModality/action-clean@v1.1.0
-
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v3
- with:
- ref: ${{ github.head_ref }} #Checking out head commit
-
- - name: Read .env file
- uses: xom9ikk/dotenv@v1.0.2
-
- - name: Create Execution matrix
- uses: fabiocaccamo/create-matrix-action@v2
- id: create_matrix
- with:
- matrix: |
- network {opal}, runtime {opal}, features {opal-runtime}, runtest {testXcmOpal}
- network {quartz}, runtime {quartz}, features {quartz-runtime}, runtest {testXcmQuartz}
- network {unique}, runtime {unique}, features {unique-runtime}, runtest {testXcmUnique}
-
- xcm-tests:
- needs: prepare-execution-marix
- # The type of runner that the job will run on
- runs-on: [XL]
-
- timeout-minutes: 600
-
- name: ${{ matrix.network }}
-
- 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.
-
- strategy:
- matrix:
- include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}
-
- steps:
- - 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
-
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v3
- with:
- ref: ${{ github.head_ref }} #Checking out head commit
-
- - name: Read .env file
- uses: xom9ikk/dotenv@v1.0.2
-
- - name: Generate ENV related extend file for docker-compose
- uses: cuchi/jinja2-action@v1.2.0
- with:
- template: .docker/docker-compose.tmp-xcm-tests.j2
- output_file: .docker/docker-compose.xcm-tests.${{ matrix.network }}.yml
- variables: |
- NETWORK=${{ matrix.network }}
-
- - name: Show build configuration
- run: cat .docker/docker-compose.xcm-tests.${{ matrix.network }}.yml
-
- - uses: actions/setup-node@v3
- with:
- node-version: 16
-
- - name: Build the stack
- run: docker-compose -f ".docker/docker-compose.xcm-tests.${{ matrix.network }}.yml" up -d --remove-orphans --force-recreate --timeout 300
-
- # 🚀 POLKADOT LAUNCH COMPLETE 🚀
- - name: Check if docker logs consist messages related to testing of xcm tests
- if: success()
- run: |
- counter=160
- function check_container_status {
- docker inspect -f {{.State.Running}} xcm-${{ matrix.network }}-testnet-local
- }
- function do_docker_logs {
- docker logs --details xcm-${{ matrix.network }}-testnet-local 2>&1
- }
- function is_started {
- if [ "$(check_container_status)" == "true" ]; then
- echo "Container: xcm-${{ matrix.network }}-testnet-local RUNNING";
- echo "Check Docker logs"
- DOCKER_LOGS=$(do_docker_logs)
- if [[ ${DOCKER_LOGS} = *"POLKADOT LAUNCH COMPLETE"* ]];then
- echo "🚀 POLKADOT LAUNCH COMPLETE 🚀"
- return 0
- else
- echo "Message not found in logs output, repeating..."
- return 1
- fi
- else
- echo "Container xcm-${{ matrix.network }}-testnet-local NOT RUNNING"
- echo "Halting all future checks"
- exit 1
- fi
- echo "something goes wrong"
- exit 1
- }
- while ! is_started; do
- echo "Waiting for special message in log files "
- sleep 30s
- counter=$(( $counter - 1 ))
- echo "Counter: $counter"
- if [ "$counter" -gt "0" ]; then
- continue
- else
- break
- fi
- done
- echo "Halting script"
- exit 0
- shell: bash
-
- - name: Run XCM tests
- working-directory: tests
- run: |
- yarn install
- yarn add mochawesome
- node scripts/readyness.js
- echo "Ready to start tests"
- NOW=$(date +%s) && yarn ${{ matrix.runtest }} --reporter mochawesome --reporter-options reportFilename=test-${NOW}
-
- - name: XCM Test Report
- uses: phoenix-actions/test-reporting@v8
- id: test-report
- if: success() || failure() # run this step even if previous step failed
- with:
- name: XCM Tests ${{ matrix.network }} # Name of the check run which will be created
- path: tests/mochawesome-report/test-*.json # Path to test results
- reporter: mochawesome-json
- fail-on-error: 'false'
-
- - name: Stop running containers
- if: always() # run this step always
- run: docker-compose -f ".docker/docker-compose.xcm-tests.${{ matrix.network }}.yml" down
-
- - name: Clean Workspace
- if: always()
- uses: AutoModality/action-clean@v1.1.0
-
- - name: Remove builder cache
- if: always() # run this step always
- run: |
- docker system prune -a -f
-
.github/workflows/xcm.ymldiffbeforeafterboth1name: Nesting XCM23on:4 workflow_call:567jobs:89 xcm-testnet-build:10 name: testnet build11 uses: ./.github/workflows/xcm-testnet-build.yml12 secrets: inherit1314 xcm-tests:15 name: tests16 needs: [ xcm-testnet-build ]17 uses: ./.github/workflows/xcm-tests_v2.yml1819