1name: MASTER - Build & Test234on: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 }}212223jobs:2425 master-build-and-test:26 27 runs-on: self-hosted-ci282930 name: ${{ matrix.network }} - Build and Test3132 continue-on-error: true 3334 strategy:35 matrix:36 include:37 - network: "Opal"38 features: "opal-runtime"39 - network: "Quartz"40 features: "quartz-runtime"41 - network: "Unique"42 features: "unique-runtime"4344 steps:45 - name: Skip if pull request is in Draft46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 if: github.event.pull_request.draft == true61 run: exit 16263 - name: Clean Workspace64 uses: AutoModality/action-clean@v1.1.06566 67 - uses: actions/checkout@v368 with:69 ref: ${{ github.head_ref }}7071 - name: Read .env file72 uses: xom9ikk/dotenv@v1.0.27374 - name: Generate ENV related extend file for docker-compose75 uses: cuchi/jinja2-action@v1.2.076 with:77 template: .docker/docker-compose.tmp-master.j278 output_file: .docker/docker-compose.${{ matrix.network }}.yml79 variables: |80 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git81 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}82 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}83 FEATURE=${{ matrix.features }}84 BRANCH=${{ github.head_ref }}8586 - name: Show build configuration87 run: cat .docker/docker-compose.${{ matrix.network }}.yml8889 - name: Build the stack90 run: docker-compose -f ".docker/docker-compose-master.yml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build9192 - uses: actions/setup-node@v393 with:94 node-version: 169596 - name: Run tests97 run: |98 cd tests99 yarn install100 yarn add mochawesome101 echo "Ready to start tests"102 node scripts/readyness.js103 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}104 env:105 RPC_URL: http://127.0.0.1:9933/106107 - name: Test Report108 uses: phoenix-actions/test-reporting@v8109 id: test-report110 if: success() || failure() 111 with:112 name: Tests ${{ matrix.network }} 113 path: tests/mochawesome-report/test-*.json 114 reporter: mochawesome-json115 fail-on-error: 'false'116117 - name: Read output variables118 run: |119 echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"120121 - name: Stop running containers122 if: always() 123 run: docker-compose -f ".docker/docker-compose-master.yml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down