git.delta.rocks / unique-network / refs/commits / 4d33e6ba2fe0

difftreelog

source

.github/workflows/dev-build-tests_v2.yml3.3 KiBsourcehistory
1# Integration test in --dev mode2# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586411104/Integration+tests3name: yarn test dev45# Triger: only call from main workflow(re-usable workflows)6on:7  workflow_call:891011# A workflow run is made up of one or more jobs that can run sequentially or in parallel12jobs:13  14  dev_build_int_tests:15    # The type of runner that the job will run on16    runs-on: [self-hosted-ci,medium]17    timeout-minutes: 13801819    name: ${{ matrix.network }}2021    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.2223    strategy:24      matrix:25        include:26          - network: "opal"27            features: "opal-runtime"28          - network: "quartz"29            features: "quartz-runtime"30          - network: "unique"31            features: "unique-runtime"3233    steps:3435      - name: Clean Workspace36        uses: AutoModality/action-clean@v1.1.03738      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it39      - uses: actions/checkout@v340        with:41          ref: ${{ github.head_ref }}  #Checking out head commit4243      - name: Read .env file44        uses: xom9ikk/dotenv@v24546      - name: Generate ENV related extend file for docker-compose47        uses: cuchi/jinja2-action@v1.2.048        with:49          template: .docker/docker-compose.tmp-dev.j250          output_file: .docker/docker-compose.${{ matrix.network }}.yml51          variables: |52            RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}53            FEATURE=${{ matrix.features }}54    5556      - name: Show build configuration57        run: cat .docker/docker-compose.${{ matrix.network }}.yml5859      - name: Build the stack60        run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans6162      - uses: actions/setup-node@v363        with:64          node-version: 166566      - name: Run tests67        working-directory: tests68        run: |69          yarn install70          yarn add mochawesome71          node scripts/readyness.js72          echo "Ready to start tests"73          yarn polkadot-types74          NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}75        env:76          RPC_URL: http://127.0.0.1:9933/7778      - name: Test Report79        uses: phoenix-actions/test-reporting@v880        id: test-report81        if: success() || failure()    # run this step even if previous step failed82        with:83          name: int test results - ${{ matrix.network }}            # Name of the check run which will be created84          path: tests/mochawesome-report/test-*.json    # Path to test results85          reporter: mochawesome-json86          fail-on-error: 'false'8788      - name: Read output variables89        run: |90          echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"9192      - name: Stop running containers93        if: always()                   # run this step always94        run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down9596      - name: Remove builder cache97        if: always()                   # run this step always98        run: |99          docker builder prune -f -a100          docker system prune -f101          docker image prune -f -a