difftreelog
ref v2
in: master
18 files changed
.docker/Dockerfile-try-runtime.j2diffbeforeafterboth--- /dev/null
+++ b/.docker/Dockerfile-try-runtime.j2
@@ -0,0 +1,40 @@
+# ===== Rust builder =====
+FROM ubuntu:20.04 as rust-builder
+LABEL maintainer="Unique.Network"
+
+ENV CARGO_HOME="/cargo-home"
+ENV PATH="/cargo-home/bin:$PATH"
+ENV TZ=UTC
+RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+
+RUN apt-get update && \
+ apt-get install -y curl cmake pkg-config libssl-dev git clang protobuf-compiler && \
+ apt-get clean && \
+ rm -r /var/lib/apt/lists/*
+
+RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none
+
+RUN rustup toolchain uninstall $(rustup toolchain list) && \
+ rustup toolchain install {{ RUST_TOOLCHAIN }} && \
+ rustup default {{ RUST_TOOLCHAIN }} && \
+ rustup target list --installed && \
+ rustup show
+RUN rustup target add wasm32-unknown-unknown --toolchain {{ RUST_TOOLCHAIN }}
+
+RUN mkdir /unique_parachain
+WORKDIR /unique_parachain
+
+
+# ===== BUILD ======
+FROM rust-builder as builder-unique
+
+ARG PROFILE=release
+
+COPY . /unique_parachain
+WORKDIR /unique_parachain
+
+RUN echo "Requested features: {{ NETWORK }}-runtime\n" && \
+ echo "Fork from: {{ REPLICA_FROM }}\n" && \
+ cargo build --features=try-runtime,{{ NETWORK }}-runtime --release
+
+CMD cargo run --release --features {{ NETWORK }}-runtime,try-runtime -- try-runtime --runtime target/release/wbuild/{{ WASM_NAME }}-runtime/{{ WASM_NAME }}_runtime.compact.compressed.wasm -lruntime=debug -ltry-runtime::cli=debug on-runtime-upgrade --checks live --uri {{ REPLICA_FROM }}
.docker/docker-compose.tmp-try-runtime.j2diffbeforeafterboth--- a/.docker/docker-compose.tmp-try-runtime.j2
+++ b/.docker/docker-compose.tmp-try-runtime.j2
@@ -2,16 +2,8 @@
services:
try-runtime:
- build:
- context: ../
- dockerfile: .docker/Dockerfile-try-runtime
- args:
- - "RUST_TOOLCHAIN={{ RUST_TOOLCHAIN }}"
- - "NETWORK={{ NETWORK }}"
- - "REPLICA_FROM={{ REPLICA_FROM }}"
- - "WASM_NAME={{ WASM_NAME }}"
- image: try-runtime
- container_name: try-runtime
+ image: uniquenetwork/tryruntime-{{ NETWORK }}-testnet-local:latest
+ container_name: tryruntime-{{ NETWORK }}-testnet-local
expose:
- 9944
- 9933
.docker/docker-compose.tmp-xcm-tests.j2diffbeforeafterboth--- a/.docker/docker-compose.tmp-xcm-tests.j2
+++ b/.docker/docker-compose.tmp-xcm-tests.j2
@@ -2,8 +2,8 @@
services:
xcm_nodes:
- image: uniquenetwork/xcm-{{ NETWORK }}-testnet-local:latest
- container_name: xcm-{{ NETWORK }}-testnet-local
+ image: uniquenetwork/ci-xcm-local:{{ NETWORK }}-{{ BUILD_TAG }}
+ container_name: xcm-{{ NETWORK }}-local
expose:
- 9844
- 9933
.github/actions/prepare/action.ymldiffbeforeafterboth--- /dev/null
+++ b/.github/actions/prepare/action.yml
@@ -0,0 +1,16 @@
+# .github/actions/prepare/action.yml
+name: 'Preparation'
+description: ''
+runs:
+ using: "composite"
+ steps:
+ - name: Setup Environment (PR)
+ if: ${{ github.event_name == 'pull_request' }}
+ shell: bash
+ run: |
+ echo "LAST_COMMIT_SHA=${{ github.event.pull_request.head.sha }}" >> ${GITHUB_ENV}
+ - name: Setup Environment (Push)
+ if: ${{ github.event_name == 'push' }}
+ shell: bash
+ run: |
+ echo "LAST_COMMIT_SHA=${GITHUB_SHA}" >> ${GITHUB_ENV}
\ No newline at end of file
.github/workflows/ci-develop.ymldiffbeforeafterboth--- a/.github/workflows/ci-develop.yml
+++ b/.github/workflows/ci-develop.yml
@@ -25,12 +25,12 @@
uses: ./.github/workflows/unit-test.yml
canary:
- if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'canary')) }} # Conditional check for draft & labels per job.
+ if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'CI-canary')) }} # Conditional check for draft & labels per job.
uses: ./.github/workflows/canary.yml
secrets: inherit # pass all secrets from initial workflow to nested
xcm:
- if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'xcm')) }} # Conditional check for draft & labels per job.
+ if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'CI-xcm')) }} # Conditional check for draft & labels per job.
uses: ./.github/workflows/xcm.yml
secrets: inherit # pass all secrets from initial workflow to nested
@@ -39,11 +39,11 @@
uses: ./.github/workflows/collator-selection.yml
forkless:
- if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'forkless')) }} # Conditional check for draft & labels per job.
+ if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'CI-forkless')) }} # Conditional check for draft & labels per job.
uses: ./.github/workflows/forkless.yml
node-only-update:
- if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'node-only-update')) }} # Conditional check for draft & labels per job.
+ if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'CI-node-only-update')) }} # Conditional check for draft & labels per job.
uses: ./.github/workflows/node-only-update.yml
# integration:
.github/workflows/codestyle.ymldiffbeforeafterboth--- a/.github/workflows/codestyle.yml
+++ b/.github/workflows/codestyle.yml
@@ -13,15 +13,13 @@
steps:
- name: Clean Workspace
uses: AutoModality/action-clean@v1.1.0
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v3.1.0
with:
ref: ${{ github.head_ref }}
- name: Install latest nightly
- uses: actions-rs/toolchain@v1
+ uses: dtolnay/rust-toolchain@nightly
with:
- toolchain: nightly
- default: true
- target: wasm32-unknown-unknown
+ targets: wasm32-unknown-unknown
components: rustfmt, clippy
- name: Run cargo fmt
run: cargo fmt -- --check # In that mode it returns only exit code.
@@ -34,10 +32,10 @@
steps:
- name: Clean Workspace
uses: AutoModality/action-clean@v1.1.0
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v3.1.0
with:
ref: ${{ github.head_ref }}
- - uses: actions/setup-node@v3
+ - uses: actions/setup-node@v3.5.1
with:
node-version: 16
- name: Install modules
@@ -49,15 +47,13 @@
if: ${{ false }}
runs-on: [ self-hosted-ci ]
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v3.1.0
- name: Install substrate dependencies
run: sudo apt install -y libssl-dev pkg-config libclang-dev clang protobuf-compiler
- name: Install latest nightly
- uses: actions-rs/toolchain@v1
+ uses: dtolnay/rust-toolchain@nightly
with:
- toolchain: nightly
- default: true
- target: wasm32-unknown-unknown
+ targets: wasm32-unknown-unknown
components: rustfmt, clippy
- name: Run cargo check
run: cargo clippy -- -Dwarnings
.github/workflows/execution-matrix.ymldiffbeforeafterboth--- a/.github/workflows/execution-matrix.yml
+++ b/.github/workflows/execution-matrix.yml
@@ -24,7 +24,7 @@
uses: AutoModality/action-clean@v1.1.0
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v3.1.0
with:
ref: ${{ github.head_ref }} #Checking out head commit
@@ -32,7 +32,7 @@
uses: xom9ikk/dotenv@v2
- name: Create Execution matrix
- uses: CertainLach/create-matrix-action@v3
+ uses: CertainLach/create-matrix-action@v4
id: create_matrix
with:
matrix: |
.github/workflows/forkless-update-data.ymldiffbeforeafterboth--- a/.github/workflows/forkless-update-data.yml
+++ b/.github/workflows/forkless-update-data.yml
@@ -23,7 +23,7 @@
uses: AutoModality/action-clean@v1.1.0
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v3.1.0
with:
ref: ${{ github.head_ref }} #Checking out head commit
@@ -31,7 +31,7 @@
uses: xom9ikk/dotenv@v2
- name: Create Execution matrix
- uses: CertainLach/create-matrix-action@v3
+ uses: CertainLach/create-matrix-action@v4
id: create_matrix
with:
matrix: |
@@ -51,14 +51,14 @@
matrix:
include: ${{fromJson(needs.execution-marix.outputs.matrix)}}
- 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.
+ continue-on-error: false #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false.
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
+ - uses: actions/checkout@v3.1.0
with:
ref: ${{ github.head_ref }} #Checking out head commit
@@ -152,7 +152,7 @@
- name: Collect Docker Logs
if: success() || failure()
- uses: jwalton/gh-docker-logs@v2.2.0
+ uses: jwalton/gh-docker-logs@v2.2.1
with:
dest: './forkless-parachain-upgrade-data-logs.${{ matrix.features }}'
images: 'node-parachain'
.github/workflows/forkless-update-nodata.ymldiffbeforeafterboth--- a/.github/workflows/forkless-update-nodata.yml
+++ b/.github/workflows/forkless-update-nodata.yml
@@ -22,7 +22,7 @@
uses: AutoModality/action-clean@v1.1.0
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v3.1.0
with:
ref: ${{ github.head_ref }} #Checking out head commit
@@ -30,7 +30,7 @@
uses: xom9ikk/dotenv@v2
- name: Create Execution matrix
- uses: CertainLach/create-matrix-action@v3
+ uses: CertainLach/create-matrix-action@v4
id: create_matrix
with:
matrix: |
@@ -49,7 +49,7 @@
name: ${{ matrix.network }}-nodata
- 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.
+ continue-on-error: false #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:
@@ -60,7 +60,7 @@
uses: AutoModality/action-clean@v1.1.0
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v3.1.0
with:
ref: ${{ github.head_ref }} #Checking out head commit
@@ -100,7 +100,7 @@
- name: Show launch-config-forkless configuration
run: cat .docker/launch-config-forkless-nodata.json
- - uses: actions/setup-node@v3
+ - uses: actions/setup-node@v3.5.1
with:
node-version: 16
@@ -156,7 +156,7 @@
- name: Collect Docker Logs
if: success() || failure()
- uses: jwalton/gh-docker-logs@v2.2.0
+ uses: jwalton/gh-docker-logs@v2.2.1
with:
dest: './forkless-parachain-upgrade-nodata-logs.${{ matrix.features }}'
images: 'node-parachain'
@@ -170,7 +170,7 @@
run: |
yarn install
yarn add mochawesome
- node scripts/readyness.js
+ ./scripts/wait_for_first_block.sh
echo "Ready to start tests"
yarn polkadot-types
NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
@@ -178,7 +178,7 @@
RPC_URL: http://127.0.0.1:9933/
- name: Test Report Parallel
- uses: phoenix-actions/test-reporting@v8
+ uses: phoenix-actions/test-reporting@v10
id: test-report-parallel
if: success() || failure() # run this step even if previous step failed
with:
@@ -193,7 +193,7 @@
run: |
yarn install
yarn add mochawesome
- node scripts/readyness.js
+ ./scripts/wait_for_first_block.sh
echo "Ready to start tests"
yarn polkadot-types
NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
@@ -201,7 +201,7 @@
RPC_URL: http://127.0.0.1:9933/
- name: Test Report Sequential
- uses: phoenix-actions/test-reporting@v8
+ uses: phoenix-actions/test-reporting@v10
id: test-report-sequential
if: success() || failure() # run this step even if previous step failed
with:
.github/workflows/generate-execution-matrix.ymldiffbeforeafterboth--- a/.github/workflows/generate-execution-matrix.yml
+++ b/.github/workflows/generate-execution-matrix.yml
@@ -28,7 +28,7 @@
uses: AutoModality/action-clean@v1.1.0
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v3.1.0
with:
ref: ${{ github.head_ref }} #Checking out head commit
@@ -36,7 +36,7 @@
uses: xom9ikk/dotenv@v2
- name: Create Execution matrix
- uses: CertainLach/create-matrix-action@v3
+ uses: CertainLach/create-matrix-action@v4
id: create_matrix
with:
matrix: |
.github/workflows/market-test.ymldiffbeforeafterboth--- a/.github/workflows/market-test.yml
+++ b/.github/workflows/market-test.yml
@@ -18,7 +18,7 @@
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.
+ continue-on-error: false #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:
@@ -36,7 +36,7 @@
ref: ${{ github.head_ref }} #Checking out head commit
- name: Checkout Market e2e tests
- uses: actions/checkout@v3
+ uses: actions/checkout@v3.1.0
with:
repository: 'UniqueNetwork/market-e2e-tests'
ssh-key: ${{ secrets.GH_PAT }}
@@ -72,7 +72,7 @@
working-directory: qa-tests
run: docker-compose -f ".docker/docker-compose.market.yml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans --force-recreate node-parachain
- - uses: actions/setup-node@v3
+ - uses: actions/setup-node@v3.5.1
with:
node-version: 16.17
@@ -93,7 +93,7 @@
# working-directory: tests
# run: |
# yarn install
-# node scripts/readyness.js
+# ./scripts/wait_for_first_block.sh
# echo "Ready to start tests"
# env:
# RPC_URL: http://127.0.0.1:9933/
.github/workflows/node-only-update.ymldiffbeforeafterboth--- a/.github/workflows/node-only-update.yml
+++ b/.github/workflows/node-only-update.yml
@@ -25,7 +25,7 @@
uses: AutoModality/action-clean@v1.1.0
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v3.1.0
with:
ref: ${{ github.head_ref }} #Checking out head commit
@@ -33,7 +33,7 @@
uses: xom9ikk/dotenv@v2
- name: Create Execution matrix
- uses: CertainLach/create-matrix-action@v3
+ uses: CertainLach/create-matrix-action@v4
id: create_matrix
with:
matrix: |
@@ -52,7 +52,7 @@
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.
+ continue-on-error: false #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:
@@ -64,7 +64,7 @@
uses: AutoModality/action-clean@v1.1.0
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v3.1.0
with:
ref: ${{ github.head_ref }} #Checking out head commit
@@ -104,7 +104,7 @@
- name: Show launch-config-forkless configuration
run: cat .docker/launch-config-forkless-nodata.json
- - uses: actions/setup-node@v3
+ - uses: actions/setup-node@v3.5.1
with:
node-version: 16
@@ -169,7 +169,7 @@
run: |
yarn install
yarn add mochawesome
- node scripts/readyness.js
+ ./scripts/wait_for_first_block.sh
echo "Ready to start tests"
yarn polkadot-types
NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
@@ -194,7 +194,7 @@
RPC_URL: http://127.0.0.1:9933/
# - name: Upload Sequential Test Report Before Node upgrade
- # uses: phoenix-actions/test-reporting@v8
+ # uses: phoenix-actions/test-reporting@v10
# id: test-sequential-report-before
# if: success() || failure() # run this step even if previous step failed
# with:
@@ -292,7 +292,7 @@
run: |
yarn install
yarn add mochawesome
- node scripts/readyness.js
+ ./scripts/wait_for_first_block.sh
echo "Ready to start tests"
yarn polkadot-types
NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
@@ -300,7 +300,7 @@
RPC_URL: http://127.0.0.1:9933/
#- name: Test Report Parallel After Node upgrade
- # uses: phoenix-actions/test-reporting@v8
+ # uses: phoenix-actions/test-reporting@v10
# id: test-report-parallel-after
# if: success() || failure() # run this step even if previous step failed
# with:
@@ -317,7 +317,7 @@
RPC_URL: http://127.0.0.1:9933/
#- name: Upload Sequential Test Report After Node upgrade
- # uses: phoenix-actions/test-reporting@v8
+ # uses: phoenix-actions/test-reporting@v10
# id: test-sequential-report-after
# if: success() || failure() # run this step even if previous step failed
# with:
.github/workflows/polkadot-types.ymldiffbeforeafterboth--- a/.github/workflows/polkadot-types.yml
+++ b/.github/workflows/polkadot-types.yml
@@ -24,7 +24,7 @@
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.
+ continue-on-error: false #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:
@@ -66,7 +66,7 @@
- name: Build the stack
run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans
- - uses: actions/setup-node@v3
+ - uses: actions/setup-node@v3.5.1
with:
node-version: 16
.github/workflows/testnet-build.ymldiffbeforeafterboth--- a/.github/workflows/testnet-build.yml
+++ b/.github/workflows/testnet-build.yml
@@ -28,7 +28,7 @@
uses: AutoModality/action-clean@v1.1.0
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v3.1.0
with:
ref: ${{ github.head_ref }} #Checking out head commit
@@ -36,7 +36,7 @@
uses: xom9ikk/dotenv@v2
- name: Create Execution matrix
- uses: fabiocaccamo/create-matrix-action@v2
+ uses: CertainLach/create-matrix-action@v4
id: create_matrix
with:
matrix: |
@@ -53,7 +53,7 @@
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.
+ continue-on-error: false #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:
@@ -68,7 +68,7 @@
uses: AutoModality/action-clean@v1.1.0
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v3.1.0
with:
ref: ${{ github.head_ref }} #Checking out head commit
.github/workflows/try-runtime.ymldiffbeforeafterboth--- a/.github/workflows/try-runtime.yml
+++ b/.github/workflows/try-runtime.yml
@@ -21,7 +21,7 @@
uses: AutoModality/action-clean@v1.1.0
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v3.1.0
with:
ref: ${{ github.head_ref }} #Checking out head commit
@@ -29,7 +29,7 @@
uses: xom9ikk/dotenv@v2
- name: Create Execution matrix
- uses: CertainLach/create-matrix-action@v3
+ uses: CertainLach/create-matrix-action@v4
id: create_matrix
with:
matrix: |
@@ -43,7 +43,7 @@
# The type of runner that the job will run on
runs-on: [self-hosted-ci]
- 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.
+ continue-on-error: false #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false.
name: ${{ matrix.network }}-try-runtime
strategy:
@@ -56,7 +56,7 @@
uses: AutoModality/action-clean@v1.1.0
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v3.1.0
with:
ref: ${{ github.head_ref }} #Checking out head commit
@@ -82,7 +82,7 @@
- name: Collect Docker Logs
if: success() || failure()
- uses: jwalton/gh-docker-logs@v2.2.0
+ uses: jwalton/gh-docker-logs@v2.2.1
with:
dest: './try-runtime-logs.${{ matrix.network }}'
images: 'try-runtime'
.github/workflows/unit-test.ymldiffbeforeafterboth--- a/.github/workflows/unit-test.yml
+++ b/.github/workflows/unit-test.yml
@@ -17,8 +17,7 @@
name: ${{ github.base_ref }}
- 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.
-
+ continue-on-error: false #Do not stop testing of matrix runs failed. As it decided during PR review - it required 50/50& Let's check it with false.
steps:
@@ -26,7 +25,7 @@
uses: AutoModality/action-clean@v1.1.0
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v3.1.0
with:
ref: ${{ github.head_ref }} #Checking out head commit
.github/workflows/xcm.ymldiffbeforeafterboth1name: 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: [self-hosted-ci]22 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@v23738 - name: Create Execution matrix39 uses: fabiocaccamo/create-matrix-action@v240 id: create_matrix41 with:42 matrix: |43 network {opal}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, cumulus_version {${{ env.WESTMINT_BUILD_BRANCH }}}, astar_version {${{ env.ASTAR_BUILD_BRANCH }}}, runtest {testXcmOpal}44 network {quartz}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}, acala_version {${{ env.KARURA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONRIVER_BUILD_BRANCH }}}, cumulus_version {${{ env.STATEMINE_BUILD_BRANCH }}}, astar_version {${{ env.SHIDEN_BUILD_BRANCH }}}, runtest {testXcmQuartz}45 network {unique}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}, acala_version {${{ env.ACALA_BUILD_BRANCH }}}, moonbeam_version {${{ env.MOONBEAM_BUILD_BRANCH }}}, cumulus_version {${{ env.STATEMINT_BUILD_BRANCH }}}, astar_version {${{ env.ASTAR_BUILD_BRANCH }}}, runtest {testXcmUnique}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 }}-build5657 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@v27879 - name: Log in to Docker Hub80 uses: docker/login-action@v2.0.081 with:82 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}83 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}8485 - name: Install jq86 run: sudo apt install jq -y8788 # Check POLKADOT version and build it if it doesn't exist in repository89 - name: Generate ENV related extend Dockerfile file for POLKADOT90 uses: cuchi/jinja2-action@v1.2.091 with:92 template: .docker/Dockerfile-polkadot.j293 output_file: .docker/Dockerfile-polkadot.${{ matrix.relay_branch }}.yml94 variables: |95 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}96 POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }}9798 - name: Check if the dockerhub repository contains the needed version POLKADOT99 run: |100 # aquire token101 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)102 export TOKEN=$TOKEN103104 # Get TAGS from DOCKERHUB POLKADOT repository105 POLKADOT_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-polkadot/tags/?page_size=100 | jq -r '."results"[]["name"]')106 # Show TAGS107 echo "POLKADOT TAGS:"108 echo $POLKADOT_TAGS109 # Check correct version POLKADOT and build it if it doesn't exist in POLKADOT TAGS110 if [[ ${POLKADOT_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.relay_branch }}"($|[[:space:]]) ]]; then111 echo "Repository has needed POLKADOT version";112 docker pull uniquenetwork/builder-polkadot:${{ matrix.relay_branch }}113 else114 echo "Repository has not needed POLKADOT version, so build it";115 cd .docker/ && docker build --no-cache --file ./Dockerfile-polkadot.${{ matrix.relay_branch }}.yml --tag uniquenetwork/builder-polkadot:${{ matrix.relay_branch }} .116 echo "Push needed POLKADOT version to the repository";117 docker push uniquenetwork/builder-polkadot:${{ matrix.relay_branch }}118 fi119 shell: bash120121 # Check ACALA version and build it if it doesn't exist in repository122 - name: Generate ENV related extend Dockerfile file for ACALA123 uses: cuchi/jinja2-action@v1.2.0124 with:125 template: .docker/Dockerfile-acala.j2126 output_file: .docker/Dockerfile-acala.${{ matrix.acala_version }}.yml127 variables: |128 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}129 ACALA_BUILD_BRANCH=${{ matrix.acala_version }}130131 - name: Check if the dockerhub repository contains the needed ACALA version132 run: |133 # aquire token134 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)135 export TOKEN=$TOKEN136137 # Get TAGS from DOCKERHUB repository138 ACALA_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-acala/tags/?page_size=100 | jq -r '."results"[]["name"]')139 # Show TAGS140 echo "ACALA TAGS:"141 echo $ACALA_TAGS142 # Check correct version ACALA and build it if it doesn't exist in ACALA TAGS143 if [[ ${ACALA_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.acala_version }}"($|[[:space:]]) ]]; then144 echo "Repository has needed ACALA version";145 docker pull uniquenetwork/builder-acala:${{ matrix.acala_version }}146 else147 echo "Repository has not needed ACALA version, so build it";148 cd .docker/ && docker build --no-cache --file ./Dockerfile-acala.${{ matrix.acala_version }}.yml --tag uniquenetwork/builder-acala:${{ matrix.acala_version }} .149 echo "Push needed ACALA version to the repository";150 docker push uniquenetwork/builder-acala:${{ matrix.acala_version }}151 fi152 shell: bash153154 # Check MOONBEAM version and build it if it doesn't exist in repository155 - name: Generate ENV related extend Dockerfile file for MOONBEAM156 uses: cuchi/jinja2-action@v1.2.0157 with:158 template: .docker/Dockerfile-moonbeam.j2159 output_file: .docker/Dockerfile-moonbeam.${{ matrix.moonbeam_version }}.yml160 variables: |161 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}162 MOONBEAM_BUILD_BRANCH=${{ matrix.moonbeam_version }}163164 - name: Check if the dockerhub repository contains the needed MOONBEAM version165 run: |166 # aquire token167 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)168 export TOKEN=$TOKEN169170 # Get TAGS from DOCKERHUB repository171 MOONBEAM_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-moonbeam/tags/?page_size=100 | jq -r '."results"[]["name"]')172 # Show TAGS173 echo "MOONBEAM TAGS:"174 echo $MOONBEAM_TAGS175 # Check correct version MOONBEAM and build it if it doesn't exist in MOONBEAM TAGS176 if [[ ${MOONBEAM_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.moonbeam_version }}"($|[[:space:]]) ]]; then177 echo "Repository has needed MOONBEAM version";178 docker pull uniquenetwork/builder-moonbeam:${{ matrix.moonbeam_version }}179 else180 echo "Repository has not needed MOONBEAM version, so build it";181 cd .docker/ && docker build --no-cache --file ./Dockerfile-moonbeam.${{ matrix.moonbeam_version }}.yml --tag uniquenetwork/builder-moonbeam:${{ matrix.moonbeam_version }} .182 echo "Push needed MOONBEAM version to the repository";183 docker push uniquenetwork/builder-moonbeam:${{ matrix.moonbeam_version }}184 fi185 shell: bash186187 # Check CUMULUS version and build it if it doesn't exist in repository188 - name: Generate ENV related extend Dockerfile file for CUMULUS189 uses: cuchi/jinja2-action@v1.2.0190 with:191 template: .docker/Dockerfile-cumulus.j2192 output_file: .docker/Dockerfile-cumulus.${{ matrix.cumulus_version }}.yml193 variables: |194 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}195 CUMULUS_BUILD_BRANCH=${{ matrix.cumulus_version }}196197 - name: Check if the dockerhub repository contains the needed CUMULUS version198 run: | 199 # aquire token200 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)201 export TOKEN=$TOKEN202203 # Get TAGS from DOCKERHUB repository204 CUMULUS_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-cumulus/tags/?page_size=100 | jq -r '."results"[]["name"]')205 # Show TAGS206 echo "CUMULUS TAGS:"207 echo $CUMULUS_TAGS208 # Check correct version CUMULUS and build it if it doesn't exist in CUMULUS TAGS209 if [[ ${CUMULUS_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.cumulus_version }}"($|[[:space:]]) ]]; then210 echo "Repository has needed CUMULUS version";211 docker pull uniquenetwork/builder-cumulus:${{ matrix.cumulus_version }}212 else213 echo "Repository has not needed CUMULUS version, so build it";214 cd .docker/ && docker build --no-cache --file ./Dockerfile-cumulus.${{ matrix.cumulus_version }}.yml --tag uniquenetwork/builder-cumulus:${{ matrix.cumulus_version }} .215 echo "Push needed CUMULUS version to the repository";216 docker push uniquenetwork/builder-cumulus:${{ matrix.cumulus_version }}217 fi218 shell: bash219220221 # Check ASTAR version and build it if it doesn't exist in repository222 - name: Generate ENV related extend Dockerfile file for ASTAR223 uses: cuchi/jinja2-action@v1.2.0224 with:225 template: .docker/Dockerfile-astar.j2226 output_file: .docker/Dockerfile-astar.${{ matrix.astar_version }}.yml227 variables: |228 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}229 ASTAR_BUILD_BRANCH=${{ matrix.astar_version }}230231 - name: Check if the dockerhub repository contains the needed ASTAR version232 run: |233 # aquire token234 TOKEN=$(curl -s -H "Content-Type: application/json" -X POST -d '{"username": "'${{ secrets.CORE_DOCKERHUB_USERNAME }}'", "password": "'${{ secrets.CORE_DOCKERHUB_TOKEN }}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token)235 export TOKEN=$TOKEN236237 # Get TAGS from DOCKERHUB repository238 ASTAR_TAGS=$(curl -s -H "Authorization: JWT ${TOKEN}" https://hub.docker.com/v2/repositories/uniquenetwork/builder-astar/tags/?page_size=100 | jq -r '."results"[]["name"]')239 # Show TAGS240 echo "ASTAR TAGS:"241 echo $ASTAR_TAGS242 # Check correct version ASTAR and build it if it doesn't exist in ASTAR TAGS243 if [[ ${ASTAR_TAGS[*]} =~ (^|[[:space:]])"${{ matrix.astar_version }}"($|[[:space:]]) ]]; then244 echo "Repository has needed ASTAR version";245 docker pull uniquenetwork/builder-astar:${{ matrix.astar_version }}246 else247 echo "Repository has not needed ASTAR version, so build it";248 cd .docker/ && docker build --no-cache --file ./Dockerfile-astar.${{ matrix.astar_version }}.yml --tag uniquenetwork/builder-astar:${{ matrix.astar_version }} .249 echo "Push needed ASTAR version to the repository";250 docker push uniquenetwork/builder-astar:${{ matrix.astar_version }}251 fi252 shell: bash253254255 - name: Generate ENV related extend launch-config file256 uses: cuchi/jinja2-action@v1.2.0257 with:258 template: .docker/xcm-config/launch-config-xcm-${{ matrix.network }}.j2259 output_file: .docker/xcm-config/launch-config-xcm-${{ matrix.network }}.json260 variables: |261 RELAY_CHAIN_TYPE=${{ env.RELAY_CHAIN_TYPE }} 262263 - name: Show launch-config-xcm-${{ matrix.network }} configuration264 run: cat .docker/xcm-config/launch-config-xcm-${{ matrix.network }}.json265266 # Build main image for XCM 267 - name: Generate ENV related extend Dockerfile file268 uses: cuchi/jinja2-action@v1.2.0269 with:270 template: .docker/Dockerfile-xcm.j2271 output_file: .docker/Dockerfile-xcm.${{ matrix.network }}.yml272 variables: |273 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}274 NETWORK=${{ matrix.network }}275 POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }}276 POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }} 277 BRANCH=${{ github.head_ref }}278 ACALA_BUILD_BRANCH=${{ matrix.acala_version }}279 ASTAR_BUILD_BRANCH=${{ matrix.astar_version }}280 MOONBEAM_BUILD_BRANCH=${{ matrix.moonbeam_version }}281 CUMULUS_BUILD_BRANCH=${{ matrix.cumulus_version }}282283 - name: Show build Dockerfile284 run: cat .docker/Dockerfile-xcm.${{ matrix.network }}.yml285286 - name: Run find-and-replace to remove slashes from branch name287 uses: mad9000/actions-find-and-replace-string@2288 id: branchname289 with:290 source: ${{ github.head_ref }}291 find: '/'292 replace: '-'293294 - name: Pull chainql docker image295 run: docker pull uniquenetwork/builder-chainql:latest296297 - name: Build the stack298 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 .299300 - name: Push docker image version301 run: docker push uniquenetwork/xcm-${{ matrix.network }}-testnet-local:nightly-${{ steps.branchname.outputs.value }}-${{ github.sha }}302303 - name: Push docker image latest304 run: docker push uniquenetwork/xcm-${{ matrix.network }}-testnet-local:latest305306 - name: Remove builder cache307 if: always() # run this step always308 run: |309 docker builder prune -f310 docker system prune -f311312 xcm-tests:313 needs: [prepare-execution-marix, xcm-build]314 # The type of runner that the job will run on315 runs-on: [XL]316317 timeout-minutes: 600318319 name: ${{ matrix.network }}-tests320321 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.322323 strategy:324 matrix:325 include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}326327 steps:328 - name: Skip if pull request is in Draft329 if: github.event.pull_request.draft == true330 run: exit 1331332 - name: Clean Workspace333 uses: AutoModality/action-clean@v1.1.0334335 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it336 - uses: actions/checkout@v3337 with:338 ref: ${{ github.head_ref }} #Checking out head commit339340 - name: Read .env file341 uses: xom9ikk/dotenv@v2342343 - name: Generate ENV related extend file for docker-compose344 uses: cuchi/jinja2-action@v1.2.0345 with:346 template: .docker/docker-compose.tmp-xcm-tests.j2347 output_file: .docker/docker-compose.xcm-tests.${{ matrix.network }}.yml348 variables: |349 NETWORK=${{ matrix.network }}350351 - name: Show build configuration352 run: cat .docker/docker-compose.xcm-tests.${{ matrix.network }}.yml353354 - uses: actions/setup-node@v3355 with:356 node-version: 16357358 - name: Build the stack359 run: docker-compose -f ".docker/docker-compose.xcm-tests.${{ matrix.network }}.yml" up -d --remove-orphans --force-recreate --timeout 300360361 # 🚀 POLKADOT LAUNCH COMPLETE 🚀362 - name: Check if docker logs consist messages related to testing of xcm tests 363 if: success()364 run: |365 counter=160366 function check_container_status {367 docker inspect -f {{.State.Running}} xcm-${{ matrix.network }}-testnet-local368 }369 function do_docker_logs {370 docker logs --details xcm-${{ matrix.network }}-testnet-local 2>&1371 }372 function is_started {373 if [ "$(check_container_status)" == "true" ]; then374 echo "Container: xcm-${{ matrix.network }}-testnet-local RUNNING";375 echo "Check Docker logs"376 DOCKER_LOGS=$(do_docker_logs)377 if [[ ${DOCKER_LOGS} = *"POLKADOT LAUNCH COMPLETE"* ]];then378 echo "🚀 POLKADOT LAUNCH COMPLETE 🚀"379 return 0380 else381 echo "Message not found in logs output, repeating..."382 return 1383 fi384 else385 echo "Container xcm-${{ matrix.network }}-testnet-local NOT RUNNING"386 echo "Halting all future checks"387 exit 1388 fi389 echo "something goes wrong"390 exit 1391 }392 while ! is_started; do393 echo "Waiting for special message in log files "394 sleep 30s395 counter=$(( $counter - 1 ))396 echo "Counter: $counter"397 if [ "$counter" -gt "0" ]; then398 continue399 else400 break401 fi402 done403 echo "Halting script"404 exit 0405 shell: bash406407 - name: Run XCM tests 408 working-directory: tests409 run: |410 yarn install411 yarn add mochawesome412 node scripts/readyness.js413 echo "Ready to start tests"414 yarn polkadot-types 415 NOW=$(date +%s) && yarn ${{ matrix.runtest }} --reporter mochawesome --reporter-options reportFilename=test-${NOW}416 env:417 RPC_URL: http://127.0.0.1:9933/418419 - name: XCM Test Report420 uses: phoenix-actions/test-reporting@v8421 id: test-report422 if: success() || failure() # run this step even if previous step failed423 with:424 name: XCM Tests ${{ matrix.network }} # Name of the check run which will be created425 path: tests/mochawesome-report/test-*.json # Path to test results426 reporter: mochawesome-json427 fail-on-error: 'false'428429 - name: Show container logs430 if: always() # run this step always431 run: docker-compose -f ".docker/docker-compose.xcm-tests.${{ matrix.network }}.yml" logs432433 - name: Stop running containers434 if: always() # run this step always435 run: docker-compose -f ".docker/docker-compose.xcm-tests.${{ matrix.network }}.yml" down436437 - name: Clean Workspace438 if: always()439 uses: AutoModality/action-clean@v1.1.0440441 - name: Remove builder cache442 if: always() # run this step always443 run: |444 docker system prune -a -f.github/workflows/yarn-dev.ymldiffbeforeafterboth--- a/.github/workflows/yarn-dev.yml
+++ b/.github/workflows/yarn-dev.yml
@@ -18,7 +18,7 @@
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.
+ continue-on-error: false #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:
@@ -34,7 +34,7 @@
uses: AutoModality/action-clean@v1.1.0
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v3.1.0
with:
ref: ${{ github.head_ref }} #Checking out head commit
@@ -57,7 +57,7 @@
- name: Build the stack
run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans
- - uses: actions/setup-node@v3
+ - uses: actions/setup-node@v3.5.1
with:
node-version: 16
@@ -66,7 +66,7 @@
run: |
yarn install
yarn add mochawesome
- node scripts/readyness.js
+ ./scripts/wait_for_first_block.sh
echo "Ready to start tests"
yarn polkadot-types
NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}
@@ -74,7 +74,7 @@
RPC_URL: http://127.0.0.1:9933/
- name: Test Report
- uses: phoenix-actions/test-reporting@v8
+ uses: phoenix-actions/test-reporting@v10
id: test-report
if: success() || failure() # run this step even if previous step failed
with:
@@ -97,3 +97,20 @@
docker builder prune -f -a
docker system prune -f
docker image prune -f -a
+
+ # check:
+ # if: always()
+ # runs-on: [self-hosted-ci]
+ # needs:
+ # - dev_build_int_tests
+
+ # steps:
+ # - name: Install python3
+ # uses: actions/setup-python@v4
+ # with:
+ # python-version: '3.10'
+
+ # - name: Decide whether the needed jobs succeeded or failed
+ # uses: re-actors/alls-green@v1.2.2
+ # with:
+ # jobs: ${{ toJSON(needs) }}
\ No newline at end of file