difftreelog
Merge pull request #666 from UniqueNetwork/rapid-parallel-start-v2-docs
in: master
Rapid parallel start v2 docs
13 files changed
.github/workflows/ci-develop.ymldiffbeforeafterboth--- a/.github/workflows/ci-develop.yml
+++ b/.github/workflows/ci-develop.yml
@@ -1,51 +1,55 @@
+# Workflow which controls starts nested workflows.
name: develop
+# Triger: PR at 'develop' branch with following types of events.
on:
pull_request:
branches: [ 'develop' ]
types: [ opened, reopened, synchronize, ready_for_review, converted_to_draft ]
+#Concurency group for control execution queue over github runners.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
+# List of a jobs included into Workflow.
jobs:
yarn-test-dev:
- if: github.event.pull_request.draft == false
+ if: github.event.pull_request.draft == false # Conditional check for draft per job.
uses: ./.github/workflows/dev-build-tests_v2.yml
unit-test:
- if: github.event.pull_request.draft == false
+ if: github.event.pull_request.draft == false # Conditional check for draft per job.
uses: ./.github/workflows/unit-test_v2.yml
canary:
- if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'canary')) }}
+ if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'canary')) }} # Conditional check for draft & labels per job.
uses: ./.github/workflows/canary.yml
- secrets: inherit # pass all secrets
+ 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')) }}
+ if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'xcm')) }} # Conditional check for draft & labels per job.
uses: ./.github/workflows/xcm.yml
- secrets: inherit # pass all secrets
+ secrets: inherit # pass all secrets from initial workflow to nested
forkless:
- if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'forkless')) }}
+ if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, '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, 'forkless')) }}
+ if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'forkless')) }} # Conditional check for draft & labels per job.
uses: ./.github/workflows/node-only-update_v2.yml
parallel_and_sequential_tests:
- if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'para')) }}
+ if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'para')) }} # Conditional check for draft & labels per job.
uses: ./.github/workflows/node-only-update_v3.yml
codestyle:
- if: github.event.pull_request.draft == false
+ if: github.event.pull_request.draft == false # Conditional check for draft per job.
uses: ./.github/workflows/codestyle_v2.yml
yarn_eslint:
- if: github.event.pull_request.draft == false
+ if: github.event.pull_request.draft == false # Conditional check for draft per job.
uses: ./.github/workflows/test_codestyle_v2.yml
.github/workflows/ci-master.ymldiffbeforeafterboth--- a/.github/workflows/ci-master.yml
+++ b/.github/workflows/ci-master.yml
@@ -1,14 +1,18 @@
+# Workflow which controls starts nested workflows.
name: master
+# Triger: PR at 'master' branch with following types of events.
on:
pull_request:
branches: [ 'master' ]
types: [ opened, reopened, synchronize, ready_for_review ]
+#Concurency group for control execution queue over github runners.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
+# List of a jobs included into Workflow.
jobs:
unit-test:
@@ -22,11 +26,11 @@
canary:
uses: ./.github/workflows/canary.yml
- secrets: inherit # pass all secrets
+ secrets: inherit # pass all secrets from initial workflow to nested
xcm:
uses: ./.github/workflows/xcm.yml
- secrets: inherit # pass all secrets
+ secrets: inherit # pass all secrets from initial workflow to nested
codestyle:
- uses: ./.github/workflows/codestyle_v2.yml
\ No newline at end of file
+ uses: ./.github/workflows/codestyle_v2.yml
.github/workflows/codestyle_v2.ymldiffbeforeafterboth--- a/.github/workflows/codestyle_v2.yml
+++ b/.github/workflows/codestyle_v2.yml
@@ -1,5 +1,8 @@
+# Nested workflow for checks related to formatting Rust code
+
name: cargo fmt
+# Triger: only call from main workflow(re-usable workflows)
on:
workflow_call:
.github/workflows/dev-build-tests_v2.ymldiffbeforeafterboth--- a/.github/workflows/dev-build-tests_v2.yml
+++ b/.github/workflows/dev-build-tests_v2.yml
@@ -1,8 +1,9 @@
+# Integration test in --dev mode
+# https://cryptousetech.atlassian.net/browse/CI-12
name: yarn test dev
-# Controls when the action will run.
+# Triger: only call from main workflow(re-usable workflows)
on:
- # Triggers the workflow on push or pull request events but only for the master branch
workflow_call:
@@ -101,4 +102,4 @@
run: |
docker builder prune -f -a
docker system prune -f
- docker image prune -f -a
\ No newline at end of file
+ docker image prune -f -a
.github/workflows/forkless-update-data_v2.ymldiffbeforeafterboth--- a/.github/workflows/forkless-update-data_v2.yml
+++ b/.github/workflows/forkless-update-data_v2.yml
@@ -1,11 +1,10 @@
-# Controls when the action will run.
+# Forkless update with data replication
+# https://cryptousetech.atlassian.net/browse/CI-42
+
+# Triger: only call from main workflow(re-usable workflows)
on:
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:
@@ -163,3 +162,10 @@
- name: Stop running containers
if: always() # run this step always
run: docker-compose -f ".docker/docker-compose-forkless.yml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down --volumes
+
+ - name: Remove builder cache
+ if: always() # run this step always
+ run: |
+ docker builder prune -f -a
+ docker system prune -f
+ docker image prune -f -a
.github/workflows/forkless-update-nodata_v2.ymldiffbeforeafterboth--- a/.github/workflows/forkless-update-nodata_v2.yml
+++ b/.github/workflows/forkless-update-nodata_v2.yml
@@ -1,6 +1,7 @@
+# Forkless update without data replication
+# https://cryptousetech.atlassian.net/browse/CI-41
-
-# Controls when the action will run.
+# Triger: only call from main workflow(re-usable workflows)
on:
workflow_call:
@@ -213,3 +214,10 @@
- name: Stop running containers
if: always() # run this step always
run: docker-compose -f ".docker/docker-compose-forkless.yml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down
+
+ - name: Remove builder cache
+ if: always() # run this step always
+ run: |
+ docker builder prune -f -a
+ docker system prune -f
+ docker image prune -f -a
.github/workflows/forkless.ymldiffbeforeafterboth--- a/.github/workflows/forkless.yml
+++ b/.github/workflows/forkless.yml
@@ -1,3 +1,5 @@
+# Intermediate Nested Workflow for calling subworkflows as a parallel tasks.
+
name: Nesting Forkless
on:
.github/workflows/market-test_v2.ymldiffbeforeafterboth1#https://cryptousetech.atlassian.net/browse/CI-372# Nested workflow for lunching Market e2e tests from external repository https://github.com/UniqueNetwork/market-e2e-tests34name: market api tests56# Controls when the action will run.7on:8 workflow_call:91011# A workflow run is made up of one or more jobs that can run sequentially or in parallel12jobs:1314 market_test:15 # The type of runner that the job will run on16 runs-on: [self-hosted-ci,large]17 timeout-minutes: 3601819 name: ${{ matrix.network }} 2021 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.22 23 strategy:24 matrix:25 include:26 - network: "opal"27 features: "opal-runtime"2829 steps:30 - name: Clean Workspace31 uses: AutoModality/action-clean@v1.1.03233 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it34 - name: Checkout master repo35 uses: actions/checkout@master36 with:37 ref: ${{ github.head_ref }} #Checking out head commit3839 - name: Checkout Market e2e tests40 uses: actions/checkout@v341 with:42 repository: 'UniqueNetwork/market-e2e-tests'43 ssh-key: ${{ secrets.GH_PAT }}44 path: 'qa-tests'45 ref: 'master'4647 - name: Read .env file48 uses: xom9ikk/dotenv@v1.0.249 50 - name: Copy qa-tests/.env.example to qa-tests/.env51 working-directory: qa-tests52 run: cp .env.docker .env53 54 - name: Generate ENV related extend file for docker-compose55 uses: cuchi/jinja2-action@v1.2.056 with:57 template: qa-tests/.docker/docker-compose.tmp-market.j258 output_file: qa-tests/.docker/docker-compose.${{ matrix.network }}.yml59 variables: |60 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git61 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}62 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}63 FEATURE=${{ matrix.features }}64 BRANCH=${{ github.head_ref }}656667 - name: Show build configuration68 working-directory: qa-tests69 run: cat .docker/docker-compose.${{ matrix.network }}.yml7071 - name: Start node-parachain72 working-directory: qa-tests73 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 74 75 - uses: actions/setup-node@v376 with:77 node-version: 16.177879 - name: Setup TypeScript80 working-directory: qa-tests81 run: |82 npm install -g ts-node83 npm install8485 - name: Copy qa-tests/.env.docker to qa-tests/.env86 working-directory: qa-tests87 run: | 88 rm -rf .env89 cp .env.docker .env9091# Temporary disable node readyness check. Have to dig into the script logic.92# - name: Wait for chain up and running93# working-directory: tests94# run: |95# yarn install96# node scripts/readyness.js97# echo "Ready to start tests"98# env:99# RPC_URL: http://127.0.0.1:9933/100101 - name: Wait for chain up and running102 run: |103 sleep 1200s104 echo "Ready to start Market e2e tests"105106 - name: Show content of .env file and Generate accounts107 working-directory: qa-tests108 run: |109 cat .env110 ts-node ./src/scripts/create-market-accounts.ts111112 - name: Copy qa-tests/.env to qa-tests/.env.docker113 working-directory: qa-tests114 run: | 115 rm -rf .env.docker116 cp .env .env.docker117118 - name: Get chain logs119 if: always() # run this step always120 run: |121 docker exec node-parachain cat /polkadot-launch/9944.log122 docker exec node-parachain cat /polkadot-launch/9945.log123 docker exec node-parachain cat /polkadot-launch/alice.log124 docker exec node-parachain cat /polkadot-launch/eve.log125 docker exec node-parachain cat /polkadot-launch/dave.log126 docker exec node-parachain cat /polkadot-launch/charlie.log127 128 - name: Deploy contracts129 run: |130 cd qa-tests131 ts-node ./src/scripts/deploy-contract.ts132133 - name: Timeout for debug134 if: failure()135 run: sleep 300s136137 - name: Import test data138 working-directory: qa-tests139 run: ts-node ./src/scripts/create-test-collections.ts140141 - name: Show content of qa-test .env142 working-directory: qa-tests143 run: cat .env144145 - name: Read qa -test .env file Before market start146 uses: xom9ikk/dotenv@v1.0.2147 with:148 path: qa-tests/149150 - name: local-market:start151 run: docker-compose -f "qa-tests/.docker/docker-compose.market.yml" -f "qa-tests/.docker/docker-compose.${{ matrix.network }}.yml" up -d --build152153 - name: Wait for market readyness154 working-directory: qa-tests155 run: src/scripts/wait-market-ready.sh156 shell: bash157158 - name: Install dependecies159 working-directory: qa-tests160 run: |161 npm ci162 npm install -D @playwright/test163 npx playwright install-deps164 npx playwright install165166 - name: Show content of qa-test .env167 working-directory: qa-tests168 run: cat .env169 170 - name: Test API interface171 working-directory: qa-tests172 run: |173 npx playwright test --workers=8 --quiet .*.api.test.ts --reporter=github --config playwright.config.ts174175 - name: Timeout for debug176 if: failure()177 run: sleep 300s178179 - name: Stop running containers180 if: always() # run this step always181 run: docker-compose -f "qa-tests/.docker/docker-compose.market.yml" -f "qa-tests/.docker/docker-compose.${{ matrix.network }}.yml" down --volumes182183 - name: Remove builder cache184 if: always() # run this step always185 run: |186 docker builder prune -f187 docker system prune -f.github/workflows/node-only-update_v2.ymldiffbeforeafterboth--- a/.github/workflows/node-only-update_v2.yml
+++ b/.github/workflows/node-only-update_v2.yml
@@ -1,12 +1,13 @@
+# https://cryptousetech.atlassian.net/browse/CI-85
+# Node only update with restart polkadot-launch process.
+
name: nodes-only update
-# Controls when the action will run.
+# Triger: only call from main workflow(re-usable workflows)
on:
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:
.github/workflows/node-only-update_v3.ymldiffbeforeafterboth--- a/.github/workflows/node-only-update_v3.yml
+++ b/.github/workflows/node-only-update_v3.yml
@@ -1,6 +1,7 @@
+# Test workflow for debug parallel and sequental tests in scope of execution time reducing.
name: Parallele tests
-# Controls when the action will run.
+# Triger: only call from main workflow(re-usable workflows)
on:
workflow_call:
#Define Workflow variables
.github/workflows/test_codestyle_v2.ymldiffbeforeafterboth--- a/.github/workflows/test_codestyle_v2.yml
+++ b/.github/workflows/test_codestyle_v2.yml
@@ -1,5 +1,8 @@
+# Yarn Eslint over tests
+#
name: yarn eslint
+# Triger: only call from main workflow(re-usable workflows)
on:
workflow_call:
.github/workflows/try-runtime_v2.ymldiffbeforeafterboth--- a/.github/workflows/try-runtime_v2.yml
+++ b/.github/workflows/try-runtime_v2.yml
@@ -1,3 +1,7 @@
+# Try-runtime checks
+# https://cryptousetech.atlassian.net/browse/CI-38
+
+# Triger: only call from main workflow(re-usable workflows)
on:
workflow_call:
@@ -66,3 +70,10 @@
- name: Stop running containers
if: always() # run this step always
run: docker-compose -f ".docker/docker-compose-try-runtime.yml" -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" down
+
+ - name: Remove builder cache
+ if: always() # run this step always
+ run: |
+ docker builder prune -f -a
+ docker system prune -f
+ docker image prune -f -a
.github/workflows/unit-test_v2.ymldiffbeforeafterboth--- a/.github/workflows/unit-test_v2.yml
+++ b/.github/workflows/unit-test_v2.yml
@@ -1,8 +1,9 @@
+# Re-Usable Workflow for lanching Unit tests
name: unit tests
# Controls when the action will run.
+# Triger: only call from main workflow(re-usable workflows)
on:
- # Triggers the workflow on push or pull request events but only for the master branch
workflow_call:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
@@ -49,3 +50,10 @@
- name: Stop running containers
if: always() # run this step always
run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.unit.yml" down
+
+ - name: Remove builder cache
+ if: always() # run this step always
+ run: |
+ docker builder prune -f -a
+ docker system prune -f
+ docker image prune -f -a