123name: yarn dev456on:7 workflow_call:89101112jobs:13 14 dev_build_int_tests:15 16 runs-on: [self-hosted-ci,medium]17 timeout-minutes: 13801819 name: ${{ matrix.network }}2021 continue-on-error: true 2223 strategy:24 matrix:25 include:26 - network: "opal"27 - network: "sapphire"28 - network: "quartz"29 - network: "unique"3031 steps:3233 - name: Clean Workspace34 uses: AutoModality/action-clean@v1.1.03536 37 - uses: actions/checkout@v3.1.038 with:39 ref: ${{ github.head_ref }} 4041 - name: Read .env file42 uses: xom9ikk/dotenv@v24344 - name: Generate ENV related extend file for docker-compose45 uses: cuchi/jinja2-action@v1.2.046 with:47 template: .docker/docker-compose.tmp-dev.j248 output_file: .docker/docker-compose.${{ matrix.network }}.yml49 variables: |50 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}51 NETWORK=${{ matrix.network }}52 5354 - name: Show build configuration55 run: cat .docker/docker-compose.${{ matrix.network }}.yml5657 - name: Build the stack58 run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans5960 - uses: actions/setup-node@v3.5.161 with:62 node-version: 186364 - name: Run tests65 working-directory: js-packages/tests66 run: |67 yarn install68 yarn add mochawesome69 ../scripts/wait_for_first_block.sh70 echo "Ready to start tests"71 NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}72 env:73 RPC_URL: http://127.0.0.1:9944/7475 - name: Test Report76 uses: phoenix-actions/test-reporting@v1077 id: test-report78 if: success() || failure() 79 with:80 name: int test results - ${{ matrix.network }} 81 path: js-packages/tests/mochawesome-report/test-*.json 82 reporter: mochawesome-json83 fail-on-error: 'false'8485 - name: Read output variables86 run: |87 echo "url is ${{ steps.test-report.outputs.runHtmlUrl }}"8889 - name: Run benchmark mintFee tests90 working-directory: js-packages/scripts91 run: |92 yarn install93 npx ts-node --esm ./benchmarks/mintFee/index.ts9495 - name: Run benchmark opsFee tests96 working-directory: js-packages/scripts97 run: |98 yarn install99 npx ts-node --esm ./benchmarks/opsFee/index.ts100101 - name: Stop running containers102 if: always() 103 run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" down104105 - name: Remove builder cache106 if: always() 107 run: |108 docker builder prune -f -a109 docker system prune -f110 docker image prune -f -a111112 113 114 115 116 117118 119 120 121 122 123124 125 126 127