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

difftreelog

source

.github/workflows/yarn-dev.yml3.9 KiBsourcehistory
1# Integration test in --dev mode2# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586411104/Integration+tests3name: yarn-dev45# Triger: only call from main workflow(re-usable workflows)6on:7  workflow_call:8  workflow_dispatch:910# A workflow run is made up of one or more jobs that can run sequentially or in parallel11jobs:12  13  dev_build_int_tests:14    # The type of runner that the job will run on15    runs-on: [ self-hosted-ci,medium ]16    timeout-minutes: 13801718    name: ${{ matrix.network }}1920    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.2122    strategy:23      matrix:24        include:25          - network: "opal"26          - network: "quartz"27          - network: "unique"2829    steps:30      - name: Clean Workspace31        uses: AutoModality/action-clean@v1.1.03233      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it34      - uses: actions/checkout@v4.1.735        with:36          ref: ${{ github.head_ref }}  #Checking out head commit3738      - name: Read .env file39        uses: xom9ikk/dotenv@v2.3.04041      - name: Generate ENV related extend file for docker-compose42        uses: cuchi/jinja2-action@v1.2.043        with:44          template: .docker/docker-compose.tmp-dev.j245          output_file: .docker/docker-compose.${{ matrix.network }}.yml46          variables: |47            NETWORK=${{ matrix.network }}48    49      - name: Show build configuration50        run: cat .docker/docker-compose.${{ matrix.network }}.yml5152      - name: Build the stack53        run: docker compose -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans5455      - uses: actions/setup-node@v4.0.256        with:57          node-version: 205859      - name: Run tests60        working-directory: js-packages/tests61        run: |62          yarn install63          yarn add mochawesome64          ../scripts/wait_for_first_block.sh65          echo "Ready to start tests"66          NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}67        env:68          RPC_URL: http://127.0.0.1:9944/6970      - name: Test Report71        uses: phoenix-actions/test-reporting@v1572        id: test-report73        if: success() || failure()    # run this step even if previous step failed74        with:75          name: int test results - ${{ matrix.network }}            # Name of the check run which will be created76          path: js-packages/tests/mochawesome-report/test-*.json    # Path to test results77          reporter: mochawesome-json78          fail-on-error: 'false'7980      - name: Read output variables81        run: |82          echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"8384      - name: Run benchmark mintFee tests85        working-directory: js-packages/scripts86        run: |87          yarn install88          node --no-warnings=ExperimentalWarning --loader ts-node/esm ./benchmarks/mintFee/index.ts8990      - name: Run benchmark opsFee tests91        working-directory: js-packages/scripts92        run: |93          yarn install94          node --no-warnings=ExperimentalWarning --loader ts-node/esm ./benchmarks/opsFee/index.ts9596      - name: Stop running containers97        if: always()                   # run this step always98        run: docker compose -f ".docker/docker-compose.${{ matrix.network }}.yml" down99100      - name: Remove builder cache101        if: always()                   # run this step always102        run: |103          docker builder prune -f -a104          docker system prune -f105          docker image prune -f -a106107  # check:108  #   if: always()109  #   runs-on: [self-hosted-ci]110  #   needs:111  #   - dev_build_int_tests112113  #   steps:114  #   - name: Install python3115  #     uses: actions/setup-python@v4116  #     with:117  #       python-version: '3.10'118119  #   - name: Decide whether the needed jobs succeeded or failed120  #     uses: re-actors/alls-green@v1.2.2121  #     with:122  #       jobs: ${{ toJSON(needs) }}