1name: Develop - Build & test234on:5 6 pull_request:7 branches:8 - develop9 types:10 - opened11 - reopened12 - synchronize 1314 15 workflow_dispatch:161718env:19 REPO_URL: ${{ github.server_url }}/${{ github.repository }}20212223jobs:24 build:25 26 runs-on: self-hosted-ci2728 name: Build Container, Spin it Up an test2930 continue-on-error: true 3132 strategy:33 matrix:34 include:35 - network: "Opal"36 features: "--features=opal-runtime"37 - network: "Quartz"38 features: "--features=quartz-runtime"39 - network: "Unique"40 features: "--features=unique-runtime"4142 steps:43 - name: Skip if pull request is in Draft44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 if: github.event.pull_request.draft == true59 run: exit 16061 - name: Clean Workspace62 uses: AutoModality/action-clean@v1.1.06364 65 - uses: actions/checkout@v366 with:67 ref: ${{ github.head_ref }} 6869 - name: Read .env file70 uses: xom9ikk/dotenv@v1.0.27172 - name: Generate ENV related extend file for docker-compose73 uses: cuchi/jinja2-action@v1.2.074 with:75 template: .docker/docker-compose.tmp.j276 output_file: .docker/docker-compose.${{ matrix.network }}.yml77 variables: |78 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git79 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}80 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}81 FEATURE=${{ matrix.features }}82 BRANCH=${{ github.head_ref }}8384 - name: Show build configuration85 run: cat .docker/docker-compose.${{ matrix.network }}.yml8687 - name: Build the stack88 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build8990 - uses: actions/setup-node@v391 with:92 node-version: 169394 - name: Run tests95 run: |96 cd tests97 yarn install98 yarn add mochawesome99 echo "Ready to start tests"100 node scripts/readyness.js101 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}102 env:103 RPC_URL: http://127.0.0.1:9933/104105 - name: Test Report106 uses: phoenix-actions/test-reporting@v8107 if: success() || failure() 108 with:109 name: Tests ${{ matrix.network }} 110 path: tests/mochawesome-report/test-*.json 111 reporter: mochawesome-json112 fail-on-error: 'false'113114 - name: Read output variables115 run: |116 echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"117118 - name: Stop running containers119 if: always() 120 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down