1name: Yarn test dev234on:5 6 pull_request:7 branches:8 - develop9 types:10 - opened11 - reopened12 - synchronize 13 - ready_for_review1415 16 workflow_dispatch:171819env:20 REPO_URL: ${{ github.server_url }}/${{ github.repository }}2122concurrency: 23 group: ${{ github.workflow }}-${{ github.ref }}24 cancel-in-progress: true252627jobs:28 dev_build_test:29 30 runs-on: [self-hosted-ci,medium]31 timeout-minutes: 13803233 name: ${{ matrix.network }}3435 continue-on-error: true 3637 strategy:38 matrix:39 include:40 - network: "Opal"41 features: "opal-runtime"42 - network: "Quartz"43 features: "quartz-runtime"44 - network: "Unique"45 features: "unique-runtime"4647 steps:48 - name: Skip if pull request is in Draft49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 if: github.event.pull_request.draft == true64 run: exit 16566 - name: Clean Workspace67 uses: AutoModality/action-clean@v1.1.06869 70 - uses: actions/checkout@v371 with:72 ref: ${{ github.head_ref }} 7374 - name: Read .env file75 uses: xom9ikk/dotenv@v1.0.27677 - name: Generate ENV related extend file for docker-compose78 uses: cuchi/jinja2-action@v1.2.079 with:80 template: .docker/docker-compose.tmp.j281 output_file: .docker/docker-compose.${{ matrix.network }}.yml82 variables: |83 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git84 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}85 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}86 FEATURE=${{ matrix.features }}87 BRANCH=${{ github.head_ref }}8889 - name: Show build configuration90 run: cat .docker/docker-compose.${{ matrix.network }}.yml9192 - name: Build the stack93 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build9495 - uses: actions/setup-node@v396 with:97 node-version: 169899 - name: Run tests100 run: |101 cd tests102 yarn install103 yarn add mochawesome104 echo "Ready to start tests"105 node scripts/readyness.js106 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}107 env:108 RPC_URL: http://127.0.0.1:9933/109110 - name: Test Report111 uses: phoenix-actions/test-reporting@v8112 id: test-report113 if: success() || failure() 114 with:115 name: Tests ${{ matrix.network }} 116 path: tests/mochawesome-report/test-*.json 117 reporter: mochawesome-json118 fail-on-error: 'false'119120 - name: Read output variables121 run: |122 echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"123124 - name: Stop running containers125 if: always() 126 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down