1name: Develop - Build & test234on:5 6 pull_request:7 branches:8 - develop9 types:10 - opened11 - reopened12 - synchronize 1314 15 workflow_dispatch:161718env:19 RUST_TOOLCHAIN: nightly-2022-05-1120 REPO_URL: ${{ github.server_url }}/${{ github.repository }}21 POLKA_VERSION: release-v0.9.24222324jobs:25 build:26 27 runs-on: self-hosted-ci2829 name: Build Container, Spin it Up an test3031 continue-on-error: false 3233 strategy:34 matrix:35 include:36 - network: "Opal"37 features: "--features=opal-runtime"38 - network: "Quartz"39 features: "--features=quartz-runtime"40 - network: "Unique"41 features: "--features=unique-runtime"4243 steps:44 45 - uses: actions/checkout@v346 with:47 ref: ${{ github.event.pull_request.head.sha }} 4849 - name: Generate ENV related extend file for docker-compose50 uses: cuchi/jinja2-action@v1.2.051 with:52 template: .docker/docker-compose.tmp.j253 output_file: .docker/docker-compose.${{ matrix.network }}.yml54 variables: |55 REPO_URL=${{ github.server_url }}/${{ github.repository }}.git56 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}57 POLKA_VERSION=${{ env.POLKA_VERSION }}58 FEATURE=${{ matrix.features }}59 BRANCH=${{ github.head_ref }}6061 - name: Show build configuration62 run: cat .docker/docker-compose.${{ matrix.network }}.yml6364 - name: Build the stack65 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build6667 - name: Wait68 run: sleep 420s6970 - name: Install node71 uses: actions/setup-node@v172 with:73 node-version: 16.x7475 - name: Install dependencies76 run: |77 cd tests78 yarn install79 yarn add mochawesome80 yarn --pure-lockfile8182 - name: Run tests83 run: |84 cd tests85 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}86 env:87 RPC_URL: http://127.0.0.1:9933/8889 - name: Test Report90 uses: phoenix-actions/test-reporting@v891 id: test-report 92 if: success() || failure() 93 with:94 name: Tests ${{ matrix.network }} 95 path: tests/mochawesome-report/test-*.json 96 reporter: mochawesome-json97 fail-on-error: 'false'9899 - name: Stop running containers100 if: always() 101 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down