git.delta.rocks / unique-network / refs/commits / e394ce340966

difftreelog

source

.github/workflows/try-runtime.yml3.6 KiBsourcehistory
1# Try-runtime checks2# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2587656213/Try+runtime34# Triger: only call from main workflow(re-usable workflows)5on:6  workflow_call:78# A workflow run is made up of one or more jobs that can run sequentially or in parallel9jobs:10  prepare-execution-marix:1112    name: Prepare execution matrix1314    runs-on: self-hosted-ci15    outputs:16      matrix: ${{ steps.create_matrix.outputs.matrix }}1718    steps:1920      - name: Clean Workspace21        uses: AutoModality/action-clean@v1.1.02223      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it24      - uses: actions/checkout@v325        with:26          ref: ${{ github.head_ref }}  #Checking out head commit2728      - name: Read .env file29        uses: xom9ikk/dotenv@v23031      - name: Create Execution matrix32        uses: CertainLach/create-matrix-action@v333        id: create_matrix34        with:35          matrix: |36            network {opal}, wasm_name {opal}, replica_from_address {${{ env.OPAL_REPLICA_FROM }}}37            network {sapphire}, wasm_name {quartz}, replica_from_address {${{ env.SAPPHIRE_REPLICA_FROM }}}38            network {quartz}, wasm_name {quartz}, replica_from_address {${{ env.QUARTZ_REPLICA_FROM }}}39            network {unique}, wasm_name {unique}, replica_from_address {${{ env.UNIQUE_REPLICA_FROM }}}4041  try-runtime:42    needs: prepare-execution-marix4344    # The type of runner that the job will run on45    runs-on: [self-hosted-ci]46    continue-on-error: true         #Do not stop testing of matrix runs failed.  As it decided during PR review - it required 50/50& Let's check it with false.4748    name: ${{ matrix.network }}-try-runtime49    strategy:50      matrix:51        include: ${{fromJson(needs.prepare-execution-marix.outputs.matrix)}}5253    steps:5455      - name: Clean Workspace56        uses: AutoModality/action-clean@v1.1.05758      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it59      - uses: actions/checkout@v360        with:61          ref: ${{ github.head_ref }}  #Checking out head commit6263      - name: Read .env file64        uses: xom9ikk/dotenv@v26566      - name: Generate ENV related extend file for docker-compose67        uses: cuchi/jinja2-action@v1.2.068        with:69          template: .docker/docker-compose.tmp-try-runtime.j270          output_file: .docker/docker-compose.try-runtime.${{ matrix.network }}.yml71          variables: |72            RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}73            NETWORK=${{ matrix.network }}74            WASM_NAME=${{ matrix.wasm_name }}75            REPLICA_FROM=${{ matrix.replica_from_address }}7677      - name: Show build configuration78        run: cat .docker/docker-compose.try-runtime.${{ matrix.network }}.yml7980      - name: Build the stack81        run: docker-compose -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" up --build  --force-recreate --timeout 300 --remove-orphans --exit-code-from try-runtime8283      - name: Collect Docker Logs84        if: success() || failure()85        uses: jwalton/gh-docker-logs@v2.2.086        with:87          dest: './try-runtime-logs.${{ matrix.network }}'88          images: 'try-runtime'8990      - name: Show docker logs91        run: cat './try-runtime-logs.${{ matrix.network }}/try-runtime.log'9293      - name: Stop running containers94        if: always()                   # run this step always95        run: docker-compose -f ".docker/docker-compose.try-runtime.${{ matrix.network }}.yml" down9697      - name: Remove builder cache98        if: always()                   # run this step always99        run: |100          docker builder prune -f -a101          docker system prune -f102          docker image prune -f -a