--- a/.docker/forkless-config/launch-config-node-update-only-v3.j2 +++ /dev/null @@ -1,131 +0,0 @@ -{ - "relaychain": { - "bin": "/polkadot/target/release/polkadot", - "upgradeBin": "/polkadot/target/release/polkadot", - "upgradeWasm": "/polkadot/target/release/wbuild/westend-runtime/westend_runtime.compact.compressed.wasm", - "chain": "rococo-local", - "nodes": [ - { - "name": "alice", - "wsPort": 9844, - "rpcPort": 9843, - "port": 30444, - "flags": [ - "-lparachain::candidate_validation=debug", - "-lxcm=trace", - "--rpc-cors=all", - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - }, - { - "name": "bob", - "wsPort": 9855, - "rpcPort": 9854, - "port": 30555, - "flags": [ - "-lparachain::candidate_validation=debug", - "-lxcm=trace", - "--rpc-cors=all", - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - }, - { - "name": "charlie", - "wsPort": 9866, - "rpcPort": 9865, - "port": 30666, - "flags": [ - "-lparachain::candidate_validation=debug", - "-lxcm=trace", - "--rpc-cors=all", - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - }, - { - "name": "dave", - "wsPort": 9877, - "rpcPort": 9876, - "port": 30777, - "flags": [ - "-lparachain::candidate_validation=debug", - "-lxcm=trace", - "--rpc-cors=all", - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - }, - { - "name": "eve", - "wsPort": 9888, - "rpcPort": 9887, - "port": 30888, - "flags": [ - "-lparachain::candidate_validation=debug", - "-lxcm=trace", - "--rpc-cors=all", - "--unsafe-rpc-external", - "--unsafe-ws-external" - ] - } - ], - "genesis": { - "runtime": { - "runtime_genesis_config": { - "parachainsConfiguration": { - "config": { - "validation_upgrade_frequency": 1, - "validation_upgrade_delay": 1 - } - } - } - } - } - }, - "parachains": [ - { - "bin": "/unique-chain/current/release/unique-collator", - "upgradeBin": "/unique-chain/target/release/unique-collator", - "upgradeWasm": "/unique-chain/target/release/wbuild/{{ WASM_NAME }}-runtime/{{ WASM_NAME }}_runtime.compact.compressed.wasm", - "id": "1000", - "balance": "1000000000000000000000000", - "nodes": [ - { - "port": 31200, - "wsPort": 9944, - "rpcPort": 9933, - "name": "alice", - "flags": [ - "--rpc-cors=all", - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug", - "--ws-max-connections=1000", - "--", - "--port=31335", - "--ws-port=9745", - "--rpc-port=9734" - ] - }, - { - "port": 31201, - "wsPort": 9945, - "rpcPort": 9934, - "name": "bob", - "flags": [ - "--rpc-cors=all", - "--unsafe-rpc-external", - "--unsafe-ws-external", - "-lxcm=trace,parity_ws::handler=debug,jsonrpsee_core=trace,jsonrpsee-core=trace,jsonrpsee_ws_server=debug", - "--ws-max-connections=1000" - ] - } - ] - } - ], - "simpleParachains": [], - "hrmpChannels": [], - "finalization": false -} --- a/.github/workflows/ci-develop.yml +++ b/.github/workflows/ci-develop.yml @@ -42,9 +42,9 @@ if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'node-only-update')) }} # Conditional check for draft & labels per job. uses: ./.github/workflows/node-only-update.yml - integration: - if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'integration')) }} # Conditional check for draft & labels per job. - uses: ./.github/workflows/integration-tests.yml + # integration: + # if: ${{ (github.event.pull_request.draft == false && contains( github.event.pull_request.labels.*.name, 'integration')) }} # Conditional check for draft & labels per job. + # uses: ./.github/workflows/integration-tests.yml codestyle: if: github.event.pull_request.draft == false # Conditional check for draft per job. --- a/.github/workflows/integration-tests.yml +++ /dev/null @@ -1,339 +0,0 @@ -# Test workflow for debug parallel and sequental tests in scope of execution time reducing. -name: Integration tests - -# Triger: only call from main workflow(re-usable workflows) -on: - workflow_call: -#Define Workflow variables - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - - nodes-execution-matrix: - - name: 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 - 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}, wasm_name {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}} - network {sapphire}, wasm_name {quartz}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}} - network {quartz}, wasm_name {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}} - network {unique}, wasm_name {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}} - - parallel-test: - needs: nodes-execution-matrix - # The type of runner that the job will run on - runs-on: [self-hosted-ci,large] - - timeout-minutes: 1380 - - name: ${{ matrix.network }} - parallel - - 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.nodes-execution-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: Generate ENV related extend file for docker-compose - uses: cuchi/jinja2-action@v1.2.0 - with: - template: .docker/docker-compose.tmp-node.j2 - output_file: .docker/docker-compose.node.${{ matrix.network }}.yml - variables: | - REPO_URL=${{ github.server_url }}/${{ github.repository }}.git - RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} - POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }} - POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }} - POLKADOT_MAINNET_BRANCH=${{ env.POLKADOT_MAINNET_BRANCH }} - MAINNET_TAG=${{ matrix.mainnet_tag }} - MAINNET_BRANCH=${{ matrix.mainnet_branch }} - NETWORK=${{ matrix.network }} - BRANCH=${{ github.head_ref }} - WASM_NAME=${{ matrix.wasm_name }} - - - name: Show build configuration - run: cat .docker/docker-compose.node.${{ matrix.network }}.yml - - - name: Generate launch-config-forkless-nodata.json - uses: cuchi/jinja2-action@v1.2.0 - with: - template: .docker/forkless-config/launch-config-node-update-only-v3.j2 - output_file: .docker/launch-config-forkless-nodata.json - variables: | - NETWORK=${{ matrix.network }} - RELAY_CHAIN_TYPE=${{ env.RELAY_CHAIN_TYPE }} - - - name: Show launch-config-forkless configuration - run: cat .docker/launch-config-forkless-nodata.json - - - uses: actions/setup-node@v3 - with: - node-version: 16 - - - name: Build the stack - run: docker-compose -f ".docker/docker-compose.node.${{ matrix.network }}.yml" up -d --build --remove-orphans --force-recreate --timeout 300 - - # 🚀 POLKADOT LAUNCH COMPLETE 🚀 - - name: Check if docker logs consist messages related to testing of Node Parachain Upgrade. - if: success() - run: | - counter=160 - function check_container_status { - docker inspect -f {{.State.Running}} node-parachain - } - function do_docker_logs { - docker logs --details node-parachain 2>&1 - } - function is_started { - if [ "$(check_container_status)" == "true" ]; then - echo "Container: node-parachain 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 node-parachain 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 Parallel tests on Node Parachain - working-directory: tests - run: | - yarn install - yarn add mochawesome - echo "Ready to start tests" - yarn polkadot-types - NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW} - env: - RPC_URL: http://127.0.0.1:9933/ - - - name: Parallel Tests report - uses: phoenix-actions/test-reporting@v8 - id: test-report-parallel - if: success() || failure() # run this step even if previous step failed - with: - name: Parallel Tests report - ${{ matrix.network }} # Name of the check run which will be created - path: tests/mochawesome-report/test-parallel-*.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.node.${{ 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 - - - name: List files in Workspace - if: always() - run: ls -la ./ - - sequential-test: - needs: nodes-execution-matrix - # The type of runner that the job will run on - runs-on: [self-hosted-ci,large] - - timeout-minutes: 1380 - - name: ${{ matrix.network }} - sequential - - 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.nodes-execution-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: Generate ENV related extend file for docker-compose - uses: cuchi/jinja2-action@v1.2.0 - with: - template: .docker/docker-compose.tmp-node.j2 - output_file: .docker/docker-compose.node.${{ matrix.network }}.yml - variables: | - REPO_URL=${{ github.server_url }}/${{ github.repository }}.git - RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} - POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }} - POLKADOT_LAUNCH_BRANCH=${{ env.POLKADOT_LAUNCH_BRANCH }} - POLKADOT_MAINNET_BRANCH=${{ env.POLKADOT_MAINNET_BRANCH }} - MAINNET_TAG=${{ matrix.mainnet_tag }} - MAINNET_BRANCH=${{ matrix.mainnet_branch }} - NETWORK=${{ matrix.network }} - BRANCH=${{ github.head_ref }} - WASM_NAME=${{ matrix.wasm_name }} - - - name: Show build configuration - run: cat .docker/docker-compose.node.${{ matrix.network }}.yml - - - name: Generate launch-config-forkless-nodata.json - uses: cuchi/jinja2-action@v1.2.0 - with: - template: .docker/forkless-config/launch-config-node-update-only-v3.j2 - output_file: .docker/launch-config-forkless-nodata.json - variables: | - NETWORK=${{ matrix.network }} - - - name: Show launch-config-forkless configuration - run: cat .docker/launch-config-forkless-nodata.json - - - uses: actions/setup-node@v3 - with: - node-version: 16 - - - name: Build the stack - run: docker-compose -f ".docker/docker-compose.node.${{ matrix.network }}.yml" up -d --build --remove-orphans --force-recreate --timeout 300 - - # 🚀 POLKADOT LAUNCH COMPLETE 🚀 - - name: Check if docker logs consist messages related to testing of Node Parachain Upgrade. - if: success() - run: | - counter=160 - function check_container_status { - docker inspect -f {{.State.Running}} node-parachain - } - function do_docker_logs { - docker logs --details node-parachain 2>&1 - } - function is_started { - if [ "$(check_container_status)" == "true" ]; then - echo "Container: node-parachain 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 node-parachain 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 Sequential tests on Node Parachain - working-directory: tests - run: | - yarn install - yarn add mochawesome - echo "Ready to start tests" - yarn polkadot-types - NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW} - env: - RPC_URL: http://127.0.0.1:9933/ - - - name: Sequential Tests report - uses: phoenix-actions/test-reporting@v8 - id: test-report-sequential - if: success() || failure() # run this step even if previous step failed - with: - name: Parallel Tests report - ${{ matrix.network }} # Name of the check run which will be created - path: tests/mochawesome-report/test-sequential-*.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.node.${{ 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 - - - name: List files in Workspace - if: always() - run: ls -la ./