1name: Yarn test para234on:5 6 pull_request:7 branches:8 - master9 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:2829 master-build-and-test:30 31 runs-on: [self-hosted-ci,large]32 timeout-minutes: 13803334 name: ${{ matrix.network }}3536 continue-on-error: true 3738 strategy:39 matrix:40 include:41 - network: "Opal"42 features: "opal-runtime"43 - network: "Quartz"44 features: "quartz-runtime"45 - network: "Unique"46 features: "unique-runtime"4748 steps:49 - name: Skip if pull request is in Draft50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 if: github.event.pull_request.draft == true65 run: exit 16667 - name: Clean Workspace68 uses: AutoModality/action-clean@v1.1.06970 71 - uses: actions/checkout@v372 with:73 ref: ${{ github.head_ref }}7475 - name: Read .env file76 uses: xom9ikk/dotenv@v1.0.27778 - name: Generate ENV related extend file for docker-compose79 uses: cuchi/jinja2-action@v1.2.080 with:81 template: .docker/docker-compose.tmp-master.j282 output_file: .docker/docker-compose.${{ matrix.network }}.yml83 variables: |84 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git85 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}86 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}87 FEATURE=${{ matrix.features }}88 BRANCH=${{ github.head_ref }}8990 - name: Show build configuration91 run: cat .docker/docker-compose.${{ matrix.network }}.yml9293 - name: Build the stack94 run: docker-compose -f ".docker/docker-compose-master.yml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build9596 - uses: actions/setup-node@v397 with:98 node-version: 1699100 - name: Run tests101 run: |102 cd tests103 yarn install104 yarn add mochawesome105 echo "Ready to start tests"106 node scripts/readyness.js107 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}108 env:109 RPC_URL: http://127.0.0.1:9933/110111 - name: Test Report112 uses: phoenix-actions/test-reporting@v8113 id: test-report114 if: success() || failure() 115 with:116 name: Tests ${{ matrix.network }} 117 path: tests/mochawesome-report/test-*.json 118 reporter: mochawesome-json119 fail-on-error: 'false'120121 - name: Read output variables122 run: |123 echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"124125 - name: Stop running containers126 if: always() 127 run: docker-compose -f ".docker/docker-compose-master.yml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down