git.delta.rocks / unique-network / refs/commits / a73c3160b586

difftreelog

source

.github/workflows/governance.yml3.8 KiBsourcehistory
1# Governance tests in --dev mode with gov-test-timings feature enabled to reduce gov timings2name: governance34# Triger: only call from main workflow(re-usable workflows)5on:6  workflow_call:7  workflow_dispatch:89# A workflow run is made up of one or more jobs that can run sequentially or in parallel10jobs:11  prepare-execution-marix:12    name: Prepare execution matrix1314    runs-on: [ self-hosted ]15    outputs:16      matrix: ${{ steps.create_matrix.outputs.matrix }}1718    steps:19      - name: Clean Workspace20        uses: AutoModality/action-clean@v1.1.02122      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it23      - uses: actions/checkout@v4.1.724        with:25          ref: ${{ github.head_ref }} #Checking out head commit2627      - name: Read .env file28        uses: xom9ikk/dotenv@v2.3.02930      - name: Create Execution matrix31        uses: CertainLach/create-matrix-action@v432        id: create_matrix33        with:34          matrix: |35            network {unique}36            network {quartz}37            network {opal}3839  dev_build_int_tests:40    needs: prepare-execution-marix41    # The type of runner that the job will run on42    runs-on: [ self-hosted-ci, medium ]43    timeout-minutes: 13804445    name: ${{ matrix.network }}46    strategy:47      matrix:48        include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}4950    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.5152    steps:53      - name: Clean Workspace54        uses: AutoModality/action-clean@v1.1.05556      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it57      - uses: actions/checkout@v4.1.758        with:59          ref: ${{ github.head_ref }} #Checking out head commit6061      - name: Read .env file62        uses: xom9ikk/dotenv@v2.3.06364      - name: Generate ENV related extend file for docker-compose65        uses: cuchi/jinja2-action@v1.2.066        with:67          template: .docker/docker-compose.gov.j268          output_file: .docker/docker-compose.${{ matrix.network }}.yml69          variables: |70            NETWORK=${{ matrix.network }}7172      - name: Show build configuration73        run: cat .docker/docker-compose.${{ matrix.network }}.yml7475      - name: Build the stack76        run: docker compose -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans7778      - uses: actions/setup-node@v4.0.279        with:80          node-version: 208182      - name: Run tests83        working-directory: js-packages/tests84        run: |85          yarn install86          yarn add mochawesome87          ../scripts/wait_for_first_block.sh88          echo "Ready to start tests"89          NOW=$(date +%s) && yarn testGovernance --reporter mochawesome --reporter-options reportFilename=test-${NOW}90        env:91          RPC_URL: http://127.0.0.1:9944/9293      - name: Test Report94        uses: phoenix-actions/test-reporting@v1595        id: test-report96        if: success() || failure() # run this step even if previous step failed97        with:98          name: int test results - ${{ matrix.network }} # Name of the check run which will be created99          path: js-packages/tests/mochawesome-report/test-*.json # Path to test results100          reporter: mochawesome-json101          fail-on-error: 'false'102103      - name: Read output variables104        run: |105          echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"106107      - name: Stop running containers108        if: always() # run this step always109        run: docker compose -f ".docker/docker-compose.${{ matrix.network }}.yml" down110111      - name: Remove builder cache112        if: always() # run this step always113        run: |114          docker builder prune -f -a115          docker system prune -f116          docker image prune -f -a