123name: yarn test dev456on:7 workflow_call:89101112jobs:13 14 dev_build_int_tests:15 16 runs-on: [self-hosted-ci,medium]17 timeout-minutes: 13801819 name: ${{ matrix.network }}2021 continue-on-error: true 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 39 - uses: actions/checkout@v340 with:41 ref: ${{ github.head_ref }} 4243 - name: Read .env file44 uses: xom9ikk/dotenv@v1.0.24546 - 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() 82 with:83 name: int test results - ${{ matrix.network }} 84 path: tests/mochawesome-report/test-*.json 85 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() 94 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down9596 - name: Remove builder cache97 if: always() 98 run: |99 docker builder prune -f -a100 docker system prune -f101 docker image prune -f -a