123name: yarn test dev456on:7 workflow_call:891011env:12 REPO_URL: ${{ github.server_url }}/${{ github.repository }}13141516jobs:17 18 dev_build_int_tests:19 20 runs-on: [self-hosted-ci,medium]21 timeout-minutes: 13802223 name: ${{ matrix.network }}2425 continue-on-error: true 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 43 - uses: actions/checkout@v344 with:45 ref: ${{ github.head_ref }} 4647 - 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() 86 with:87 name: int test results - ${{ matrix.network }} 88 path: tests/mochawesome-report/test-*.json 89 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() 98 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down99100 - name: Remove builder cache101 if: always() 102 run: |103 docker builder prune -f -a104 docker system prune -f105 docker image prune -f -a