1name: yarn test dev234on:5 6 workflow_call:78910env:11 REPO_URL: ${{ github.server_url }}/${{ github.repository }}12131415161718jobs:19 20 dev_build_int_tests:21 22 runs-on: [self-hosted-ci,medium]23 timeout-minutes: 13802425 name: ${{ matrix.network }}2627 continue-on-error: true 2829 strategy:30 matrix:31 include:32 - network: "opal"33 features: "opal-runtime"34 - network: "quartz"35 features: "quartz-runtime"36 - network: "unique"37 features: "unique-runtime"3839 steps:40 - name: Skip if pull request is in Draft41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 if: github.event.pull_request.draft == true56 run: exit 15758 - name: Clean Workspace59 uses: AutoModality/action-clean@v1.1.06061 62 - uses: actions/checkout@v363 with:64 ref: ${{ github.head_ref }} 6566 - name: Read .env file67 uses: xom9ikk/dotenv@v1.0.26869 - name: Generate ENV related extend file for docker-compose70 uses: cuchi/jinja2-action@v1.2.071 with:72 template: .docker/docker-compose.tmp-dev.j273 output_file: .docker/docker-compose.${{ matrix.network }}.yml74 variables: |75 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}76 FEATURE=${{ matrix.features }}77 7879 - name: Show build configuration80 run: cat .docker/docker-compose.${{ matrix.network }}.yml8182 - name: Build the stack83 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans8485 - uses: actions/setup-node@v386 with:87 node-version: 168889 - name: Run tests90 run: |91 cd tests92 yarn install93 yarn add mochawesome94 echo "Ready to start tests"95 node scripts/readyness.js96 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}97 env:98 RPC_URL: http://127.0.0.1:9933/99100 - name: Test Report101 uses: phoenix-actions/test-reporting@v8102 id: test-report103 if: success() || failure() 104 with:105 name: int test results - ${{ matrix.network }} 106 path: tests/mochawesome-report/test-*.json 107 reporter: mochawesome-json108 fail-on-error: 'false'109110 - name: Read output variables111 run: |112 echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"113114 - name: Stop running containers115 if: always() 116 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down