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 }}202122jobs:23 dev_build_test:24 25 runs-on: self-hosted-ci2627 name: Build Container, Spin it Up an test2829 continue-on-error: true 3031 strategy:32 matrix:33 include:34 - network: "Opal"35 features: " "36 - network: "Quartz"37 features: "--features=quartz-runtime"38 - network: "Unique"39 features: "--features=unique-runtime"4041 steps:42 - name: Skip if pull request is in Draft43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 if: github.event.pull_request.draft == true58 run: exit 15960 - name: Clean Workspace61 uses: AutoModality/action-clean@v1.1.06263 64 - uses: actions/checkout@v365 with:66 ref: ${{ github.head_ref }} 6768 - name: Read .env file69 uses: xom9ikk/dotenv@v1.0.27071 - name: Generate ENV related extend file for docker-compose72 uses: cuchi/jinja2-action@v1.2.073 with:74 template: .docker/docker-compose.tmp.j275 output_file: .docker/docker-compose.${{ matrix.network }}.yml76 variables: |77 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git78 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}79 POLKADOT_BUILD_BRANCH=${{ env.POLKADOT_BUILD_BRANCH }}80 FEATURE=${{ matrix.features }}81 BRANCH=${{ github.head_ref }}8283 - name: Show build configuration84 run: cat .docker/docker-compose.${{ matrix.network }}.yml8586 - name: Build the stack87 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build8889 - uses: actions/setup-node@v390 with:91 node-version: 169293 - name: Run tests94 run: |95 cd tests96 yarn install97 yarn add mochawesome98 echo "Ready to start tests"99 node scripts/readyness.js100 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}101 env:102 RPC_URL: http://127.0.0.1:9933/103104 - name: Test Report105 uses: phoenix-actions/test-reporting@v8106 id: test-report107 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