12name: governance345on:6 workflow_call:7 workflow_dispatch:8910jobs: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 23 - uses: actions/checkout@v4.1.724 with:25 ref: ${{ github.head_ref }} 2627 - 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 42 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 5152 steps:53 - name: Clean Workspace54 uses: AutoModality/action-clean@v1.1.05556 57 - uses: actions/checkout@v4.1.758 with:59 ref: ${{ github.head_ref }} 6061 - 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() 97 with:98 name: int test results - ${{ matrix.network }} 99 path: js-packages/tests/mochawesome-report/test-*.json 100 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() 109 run: docker compose -f ".docker/docker-compose.${{ matrix.network }}.yml" down110111 - name: Remove builder cache112 if: always() 113 run: |114 docker builder prune -f -a115 docker system prune -f116 docker image prune -f -a