difftreelog
enable governance workflow for develop and master branch
in: master
4 files changed
.github/workflows/ci-develop.ymldiffbeforeafterboth1# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586869783/CI+Develop2# Workflow which controls starts nested workflows.3name: develop45# Triger: PR at 'develop' branch with following types of events.6on:7 pull_request:8 branches: [ 'develop', 'ci/baedeker' ]9 types: [ opened, reopened, synchronize, ready_for_review, converted_to_draft ]1011#Concurency group for control execution queue over github runners.12concurrency:13 group: ${{ github.workflow }}-${{ github.head_ref }}14 cancel-in-progress: true1516# List of a jobs included into Workflow.17jobs:1819 yarn-dev:20 if: github.event.pull_request.draft == false # Conditional check for draft per job.21 uses: ./.github/workflows/yarn-dev.yml22 secrets: inherit 2324 unit-test:25 if: github.event.pull_request.draft == false # Conditional check for draft per job.26 uses: ./.github/workflows/unit-test.yml27 secrets: inherit 2829 canary:30 if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'CI-canary')) }} # Conditional check for draft & labels per job.31 uses: ./.github/workflows/canary.yml32 secrets: inherit # pass all secrets from initial workflow to nested3334 xcm:35 if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'CI-xcm')) }} # Conditional check for draft & labels per job.36 uses: ./.github/workflows/xcm.yml37 secrets: inherit # pass all secrets from initial workflow to nested38 39 collator-selection:40 if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'CI-collator-selection')) }} # Conditional check for draft & labels per job.41 uses: ./.github/workflows/collator-selection.yml42 secrets: inherit 43 44 forkless-update-data:45 if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'CI-forkless')) }} # Conditional check for draft & labels per job. 46 uses: ./.github/workflows/forkless-update-data.yml47 secrets: inherit # pass all secrets from initial workflow to nested 4849 forkless-update-no-data:50 if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'CI-forkless')) }} # Conditional check for draft & labels per job.51 uses: ./.github/workflows/forkless-update-nodata.yml52 secrets: inherit # pass all secrets from initial workflow to nested 5354 try-runtime:55 if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'CI-forkless')) }} # Conditional check for draft & labels per job. 56 uses: ./.github/workflows/try-runtime.yml57 secrets: inherit # pass all secrets from initial workflow to nested 5859 node-only-update:60 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.61 uses: ./.github/workflows/node-only-update.yml62 secrets: inherit6364 gov:65 if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'CI-gov')) }} # Conditional check for draft & labels per job.66 uses: ./.github/workflows/gov.yml67 secrets: inherit # pass all secrets from initial workflow to nested6869 codestyle:70 if: github.event.pull_request.draft == false # Conditional check for draft per job.71 uses: ./.github/workflows/codestyle.yml72 secrets: inherit.github/workflows/ci-master.ymldiffbeforeafterboth--- a/.github/workflows/ci-master.yml
+++ b/.github/workflows/ci-master.yml
@@ -52,6 +52,10 @@
uses: ./.github/workflows/node-only-update.yml
secrets: inherit
+ governance:
+ uses: ./.github/workflows/governance.yml
+ secrets: inherit
+
codestyle:
uses: ./.github/workflows/codestyle.yml
secrets: inherit
.github/workflows/gov.ymldiffbeforeafterboth--- a/.github/workflows/gov.yml
+++ /dev/null
@@ -1,117 +0,0 @@
-# Governance tests in --dev mode with gov-test-timings feature enabled to reduce gov timings
-name: governance tests
-
-# Triger: only call from main workflow(re-usable workflows)
-on:
- workflow_call:
-
-# 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: self-hosted-ci
- 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.1.0
- with:
- ref: ${{ github.head_ref }} #Checking out head commit
-
- - name: Read .env file
- uses: xom9ikk/dotenv@v2
-
- - name: Create Execution matrix
- uses: CertainLach/create-matrix-action@v4
- id: create_matrix
- with:
- matrix: |
- network {quartz}, wasm_name {quartz}
- network {opal}, wasm_name {opal}
- network {sapphire}, wasm_name {quartz}
-
- dev_build_int_tests:
- needs: prepare-execution-marix
- # The type of runner that the job will run on
- runs-on: [self-hosted-ci, medium]
- timeout-minutes: 1380
-
- name: ${{ matrix.network }}
- strategy:
- matrix:
- include: ${{fromJson(needs.prepare-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.
-
- 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.1.0
- with:
- ref: ${{ github.head_ref }} #Checking out head commit
-
- - name: Read .env file
- uses: xom9ikk/dotenv@v2
-
- - name: Generate ENV related extend file for docker-compose
- uses: cuchi/jinja2-action@v1.2.0
- with:
- template: .docker/docker-compose.gov.j2
- output_file: .docker/docker-compose.${{ matrix.network }}.yml
- variables: |
- RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
- NETWORK=${{ matrix.network }}
- WASM_NAME=${{ matrix.wasm_name }}
-
- - name: Show build configuration
- run: cat .docker/docker-compose.${{ matrix.network }}.yml
-
- - name: Build the stack
- run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans
-
- - uses: actions/setup-node@v3.5.1
- with:
- node-version: 16
-
- - name: Run tests
- working-directory: tests
- run: |
- yarn install
- yarn add mochawesome
- ./scripts/wait_for_first_block.sh
- echo "Ready to start tests"
- NOW=$(date +%s) && yarn testGovernance --reporter mochawesome --reporter-options reportFilename=test-${NOW}
- env:
- RPC_URL: http://127.0.0.1:9944/
-
- - name: Test Report
- uses: phoenix-actions/test-reporting@v10
- id: test-report
- if: success() || failure() # run this step even if previous step failed
- with:
- name: int test results - ${{ 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: Read output variables
- run: |
- echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"
-
- - name: Stop running containers
- if: always() # run this step always
- run: docker-compose -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/governance.ymldiffbeforeafterboth--- /dev/null
+++ b/.github/workflows/governance.yml
@@ -0,0 +1,117 @@
+# Governance tests in --dev mode with gov-test-timings feature enabled to reduce gov timings
+name: governance tests
+
+# Triger: only call from main workflow(re-usable workflows)
+on:
+ workflow_call:
+
+# 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: self-hosted-ci
+ 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.1.0
+ with:
+ ref: ${{ github.head_ref }} #Checking out head commit
+
+ - name: Read .env file
+ uses: xom9ikk/dotenv@v2
+
+ - name: Create Execution matrix
+ uses: CertainLach/create-matrix-action@v4
+ id: create_matrix
+ with:
+ matrix: |
+ network {quartz}, wasm_name {quartz}
+ network {opal}, wasm_name {opal}
+ network {sapphire}, wasm_name {quartz}
+
+ dev_build_int_tests:
+ needs: prepare-execution-marix
+ # The type of runner that the job will run on
+ runs-on: [self-hosted-ci, medium]
+ timeout-minutes: 1380
+
+ name: ${{ matrix.network }}
+ strategy:
+ matrix:
+ include: ${{fromJson(needs.prepare-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.
+
+ 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.1.0
+ with:
+ ref: ${{ github.head_ref }} #Checking out head commit
+
+ - name: Read .env file
+ uses: xom9ikk/dotenv@v2
+
+ - name: Generate ENV related extend file for docker-compose
+ uses: cuchi/jinja2-action@v1.2.0
+ with:
+ template: .docker/docker-compose.gov.j2
+ output_file: .docker/docker-compose.${{ matrix.network }}.yml
+ variables: |
+ RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
+ NETWORK=${{ matrix.network }}
+ WASM_NAME=${{ matrix.wasm_name }}
+
+ - name: Show build configuration
+ run: cat .docker/docker-compose.${{ matrix.network }}.yml
+
+ - name: Build the stack
+ run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans
+
+ - uses: actions/setup-node@v3.5.1
+ with:
+ node-version: 16
+
+ - name: Run tests
+ working-directory: tests
+ run: |
+ yarn install
+ yarn add mochawesome
+ ./scripts/wait_for_first_block.sh
+ echo "Ready to start tests"
+ NOW=$(date +%s) && yarn testGovernance --reporter mochawesome --reporter-options reportFilename=test-${NOW}
+ env:
+ RPC_URL: http://127.0.0.1:9944/
+
+ - name: Test Report
+ uses: phoenix-actions/test-reporting@v10
+ id: test-report
+ if: success() || failure() # run this step even if previous step failed
+ with:
+ name: int test results - ${{ 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: Read output variables
+ run: |
+ echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"
+
+ - name: Stop running containers
+ if: always() # run this step always
+ run: docker-compose -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