From 35d50c165268041d0ad077801aecc7c65a3c8dfb Mon Sep 17 00:00:00 2001 From: Max Andreev Date: Fri, 02 Dec 2022 11:49:32 +0000 Subject: [PATCH] Node-only update: run tests in parallel --- --- a/.github/workflows/node-only-update.yml +++ b/.github/workflows/node-only-update.yml @@ -160,58 +160,36 @@ ref: ${{ matrix.mainnet_branch }} #Checking out head commit path: ${{ matrix.mainnet_branch }} - - name: Run tests before Node Parachain upgrade + - name: Run Parallel tests before Node Parachain upgrade working-directory: ${{ matrix.mainnet_branch }}/tests + if: success() || failure() run: | yarn install yarn add mochawesome node scripts/readyness.js echo "Ready to start tests" yarn polkadot-types - NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-before-${NOW} + NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW} env: RPC_URL: http://127.0.0.1:9933/ - - - name: Upload Test Report Before Node upgrade - uses: phoenix-actions/test-reporting@v8 - id: test-report-before - if: success() || failure() # run this step even if previous step failed - with: - name: Tests before node upgrade ${{ matrix.network }} # Name of the check run which will be created - path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-before-*.json # Path to test results - reporter: mochawesome-json - fail-on-error: 'false' - token: ${{ secrets.GITHUB_TOKEN }} - # TODO uncomment thease steps after the merge - #- name: Run Parallel tests before Node Parachain upgrade - # working-directory: ${{ matrix.mainnet_branch }}/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: Upload Parallel Test Report Before Node upgrade + # uses: phoenix-actions/test-reporting@v8 + # id: test-parallel-report-before + # if: success() || failure() # run this step even if previous step failed + # with: + # name: Tests before node upgrade ${{ matrix.network }} # Name of the check run which will be created + # path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-parallel-*.json # Path to test results + # reporter: mochawesome-json + # fail-on-error: 'false' - #- name: Upload Parallel Test Report Before Node upgrade - # uses: phoenix-actions/test-reporting@v8 - # id: test-parallel-report-before - # if: success() || failure() # run this step even if previous step failed - # with: - # name: Tests before node upgrade ${{ matrix.network }} # Name of the check run which will be created - # path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-parallel-*.json # Path to test results - # reporter: mochawesome-json - # fail-on-error: 'false' + - name: Run Sequential tests before Node Parachain upgrade + if: success() || failure() + working-directory: ${{ matrix.mainnet_branch }}/tests + run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW} + env: + RPC_URL: http://127.0.0.1:9933/ - # - name: Run Sequential tests before Node Parachain upgrade - # if: success() || failure() - # working-directory: ${{ matrix.mainnet_branch }}/tests - # run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW} - # env: - # RPC_URL: http://127.0.0.1:9933/ - # - name: Upload Sequential Test Report Before Node upgrade # uses: phoenix-actions/test-reporting@v8 # id: test-sequential-report-before @@ -305,44 +283,19 @@ exit 0 shell: bash - ## TODO: Remove next two blocks before switch to Parrallel & Sequental tests. Uncoment commented blocks. - - name: Run tests after Node Parachain upgrade + - name: Run Parallel tests after Node Parachain upgrade + working-directory: ${{ matrix.mainnet_branch }}/tests if: success() || failure() # run this step even if previous step failed - working-directory: ${{ matrix.mainnet_branch }}/tests run: | yarn install yarn add mochawesome node scripts/readyness.js echo "Ready to start tests" yarn polkadot-types - NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-after-${NOW} + NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW} env: RPC_URL: http://127.0.0.1:9933/ - # - name: Test Report After Node upgrade - # uses: phoenix-actions/test-reporting@v8 - # id: test-report-after - # if: success() || failure() # run this step even if previous step failed - # with: - # name: Tests after node upgrade ${{ matrix.network }} # Name of the check run which will be created - # path: ${{ matrix.mainnet_branch }}/tests/mochawesome-report/test-after-*.json # Path to test results - # reporter: mochawesome-json - # fail-on-error: 'false' - # token: ${{ secrets.GITHUB_TOKEN }} - - # TODO uncomment thease steps after the merge - #- name: Run Parallel tests after Node Parachain upgrade - # working-directory: ${{ matrix.mainnet_branch }}/tests - # run: | - # yarn install - # yarn add mochawesome - # node scripts/readyness.js - # 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: Test Report Parallel After Node upgrade # uses: phoenix-actions/test-reporting@v8 # id: test-report-parallel-after @@ -353,12 +306,12 @@ # reporter: mochawesome-json # fail-on-error: 'false' - #- name: Run Sequential tests after Node Parachain upgrade - # if: success() || failure() - # working-directory: ${{ matrix.mainnet_branch }}/tests - # run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW} - # env: - # RPC_URL: http://127.0.0.1:9933/ + - name: Run Sequential tests after Node Parachain upgrade + if: success() || failure() + working-directory: ${{ matrix.mainnet_branch }}/tests + run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW} + env: + RPC_URL: http://127.0.0.1:9933/ #- name: Upload Sequential Test Report After Node upgrade # uses: phoenix-actions/test-reporting@v8 @@ -369,7 +322,6 @@ # path: ${{ matrix.mainnet_branch }}/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 -- gitstuff