1name: yarn test para234on:5 6 pull_request:7 branches:8 - master9 types:10 - opened11 - reopened12 - synchronize 1314 15 workflow_dispatch:161718env:19 REPO_URL: ${{ github.server_url }}/${{ github.repository }}202122jobs:2324 master-build-and-test:25 26 runs-on: [self-hosted-ci,large]27 timeout-minutes: 13802829 name: ${{ matrix.network }}3031 continue-on-error: true 3233 strategy:34 matrix:35 include:36 - network: "Opal"37 features: "opal-runtime"38 - network: "Quartz"39 features: "quartz-runtime"40 - network: "Unique"41 features: "unique-runtime"4243 steps:44 - name: Skip if pull request is in Draft45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 if: github.event.pull_request.draft == true60 run: exit 16162 - name: Clean Workspace63 uses: AutoModality/action-clean@v1.1.06465 66 - uses: actions/checkout@v367 with:68 ref: ${{ github.head_ref }}6970 - name: Read .env file71 uses: xom9ikk/dotenv@v1.0.27273 - name: Generate ENV related extend file for docker-compose74 uses: cuchi/jinja2-action@v1.2.075 with:76 template: .docker/docker-compose.tmp-master.j277 output_file: .docker/docker-compose.${{ matrix.network }}.yml78 variables: |79 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git80 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}81 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}82 FEATURE=${{ matrix.features }}83 BRANCH=${{ github.head_ref }}8485 - name: Show build configuration86 run: cat .docker/docker-compose.${{ matrix.network }}.yml8788 - name: Build the stack89 run: docker-compose -f ".docker/docker-compose-master.yml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build9091 - uses: actions/setup-node@v392 with:93 node-version: 169495 - name: Run tests96 run: |97 cd tests98 yarn install99 yarn add mochawesome100 echo "Ready to start tests"101 node scripts/readyness.js102 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}103 env:104 RPC_URL: http://127.0.0.1:9933/105106 - name: Test Report107 uses: phoenix-actions/test-reporting@v8108 id: test-report109 if: success() || failure() 110 with:111 name: Tests ${{ matrix.network }} 112 path: tests/mochawesome-report/test-*.json 113 reporter: mochawesome-json114 fail-on-error: 'false'115116 - name: Read output variables117 run: |118 echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"119120 - name: Stop running containers121 if: always() 122 run: docker-compose -f ".docker/docker-compose-master.yml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down