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

difftreelog

source

.github/workflows/dev-build-tests_v2.yml3.4 KiBsourcehistory
1# Integration test in --dev mode2# https://cryptousetech.atlassian.net/browse/CI-123name: yarn test dev45# Triger: only call from main workflow(re-usable workflows)6on:7  workflow_call:8910#Define Workflow variables11env:12  REPO_URL: ${{ github.server_url }}/${{ github.repository }}131415# A workflow run is made up of one or more jobs that can run sequentially or in parallel16jobs:17  18  dev_build_int_tests:19    # The type of runner that the job will run on20    runs-on: [self-hosted-ci,medium]21    timeout-minutes: 13802223    name: ${{ matrix.network }}2425    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.2627    strategy:28      matrix:29        include:30          - network: "opal"31            features: "opal-runtime"32          - network: "quartz"33            features: "quartz-runtime"34          - network: "unique"35            features: "unique-runtime"3637    steps:3839      - name: Clean Workspace40        uses: AutoModality/action-clean@v1.1.04142      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it43      - uses: actions/checkout@v344        with:45          ref: ${{ github.head_ref }}  #Checking out head commit4647      - name: Read .env file48        uses: xom9ikk/dotenv@v1.0.24950      - name: Generate ENV related extend file for docker-compose51        uses: cuchi/jinja2-action@v1.2.052        with:53          template: .docker/docker-compose.tmp-dev.j254          output_file: .docker/docker-compose.${{ matrix.network }}.yml55          variables: |56            RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}57            FEATURE=${{ matrix.features }}58    5960      - name: Show build configuration61        run: cat .docker/docker-compose.${{ matrix.network }}.yml6263      - name: Build the stack64        run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans6566      - uses: actions/setup-node@v367        with:68          node-version: 166970      - name: Run tests71        working-directory: tests72        run: |73          yarn install74          yarn add mochawesome75          node scripts/readyness.js76          echo "Ready to start tests"77          yarn polkadot-types78          NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}79        env:80          RPC_URL: http://127.0.0.1:9933/8182      - name: Test Report83        uses: phoenix-actions/test-reporting@v884        id: test-report85        if: success() || failure()    # run this step even if previous step failed86        with:87          name: int test results - ${{ matrix.network }}            # Name of the check run which will be created88          path: tests/mochawesome-report/test-*.json    # Path to test results89          reporter: mochawesome-json90          fail-on-error: 'false'9192      - name: Read output variables93        run: |94          echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"9596      - name: Stop running containers97        if: always()                   # run this step always98        run: docker-compose -f ".docker/docker-compose-dev.yaml" -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 -a