git.delta.rocks / unique-network / refs/commits / 20c3f3560630

difftreelog

get branch from strategy matrix

Alexander Aksenov2022-09-06parent: #ff2c5cb.patch.diff
in: master

1 file changed

modified.github/workflows/autogen-js-types.ymldiffbeforeafterboth
before · .github/workflows/autogen-js-types.yml
1name: yarn autogetn JS types23# Controls when the action will run.4on:5 # Triggers the workflow on push or pull request events but only for the master branch6  pull_request:7    branches:8      - develop9    types:10      - opened11      - reopened12      - synchronize   #commit(s) pushed to the pull request13      - ready_for_review1415  # Allows you to run this workflow manually from the Actions tab16  workflow_dispatch:1718#Define Workflow variables19env:20  REPO_URL: ${{ github.server_url }}/${{ github.repository }}2122concurrency: 23  group: ${{ github.workflow }}-${{ github.head_ref }}24  cancel-in-progress: true2526# A workflow run is made up of one or more jobs that can run sequentially or in parallel27jobs:28  29  autogen_js_types:30    # The type of runner that the job will run on31    runs-on: [self-hosted-ci,medium]32    timeout-minutes: 13803334    name: ${{ matrix.network }}3536    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.3738    strategy:39      matrix:40        include:41          - network: "opal"42            features: "opal-runtime"43          - network: "quartz"44            features: "quartz-runtime"45          - network: "unique"46            features: "unique-runtime"4748    steps:49      - name: Clean Workspace50        uses: AutoModality/action-clean@v1.1.05152      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it53      - uses: actions/checkout@v354        with:55          ref: ${{ github.head_ref }}  #Checking out head commit5657      - name: Read .env file58        uses: xom9ikk/dotenv@v1.0.25960      - name: Generate ENV related extend file for docker-compose61        uses: cuchi/jinja2-action@v1.2.062        with:63          template: .docker/docker-compose.tmp-dev.j264          output_file: .docker/docker-compose.${{ matrix.network }}.yml65          variables: |66            RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}67            FEATURE=${{ matrix.features }}68    6970      - name: Show build configuration71        run: cat .docker/docker-compose.${{ matrix.network }}.yml7273      - name: Build the stack74        run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans75 76      - name: Wait untill node-dev started.77        run: sleep 600s7879      - uses: actions/setup-node@v380        with:81          node-version: 168283      - name: Generate 84        working-directory: tests85        run: |86          yarn install87          yarn polkadot-types8889      - name: Checkou repo UniqueNetwork/unique-types-js90        uses: actions/checkout@v391        with:92          repository: 'UniqueNetwork/unique-types-js'93#          ssh-key: ${{ secrets.GH_PAT }}94          path: 'tests/unique-types-js'95#          ref: 'QA-65_maxandreev'96 97      - name: Copy files98        working-directory: tests99        run: |100          rsync -ar --exclude .gitignore src/interfaces/ unique-types-js101          for file in unique-types-js/augment-* unique-types-js/**/types.ts unique-types-js/registry.ts; do102              sed -i '1s;^;//@ts-nocheck\n;' $file103          done104105      - name: Enumerate files after generation106        working-directory: tests/unique-types-js107        run: |108          ls -la109110      - name: Enumerate files after generation111        working-directory: tests/112        run: |113          ls -la114115      - name: Upload JS types to repo116        working-directory: tests/unique-types-js117        run: |118          git config user.name github-actions119          git config user.email github-actions@github.com120          git add .121          git commit -m "chore: regenerate types"122123      - name: Push changes124        uses: ad-m/github-push-action@master125        with:126          github_token: ${{ secrets.GITHUB_TOKEN }}127          branch: ${{ github.ref }}128          repository: 'UniqueNetwork/unique-types-js'129          ssh: true130131      - name: Stop running containers132        if: always()                   # run this step always133        run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down
after · .github/workflows/autogen-js-types.yml
1name: yarn autogetn JS types23# Controls when the action will run.4on:5 # Triggers the workflow on push or pull request events but only for the master branch6  pull_request:7    branches:8      - develop9    types:10      - opened11      - reopened12      - synchronize   #commit(s) pushed to the pull request13      - ready_for_review1415  # Allows you to run this workflow manually from the Actions tab16  workflow_dispatch:1718#Define Workflow variables19env:20  REPO_URL: ${{ github.server_url }}/${{ github.repository }}2122concurrency: 23  group: ${{ github.workflow }}-${{ github.head_ref }}24  cancel-in-progress: true2526# A workflow run is made up of one or more jobs that can run sequentially or in parallel27jobs:28  29  autogen_js_types:30    # The type of runner that the job will run on31    runs-on: [self-hosted-ci,medium]32    timeout-minutes: 13803334    name: ${{ matrix.network }}3536    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.3738    strategy:39      matrix:40        include:41          - network: "opal"42            features: "opal-runtime"43            branch: "opal-testnet"44          - network: "quartz"45            features: "quartz-runtime"46            branch: "quartz-mainnet"47          - network: "unique"48            features: "unique-runtime"49            branch: "master"5051    steps:52      - name: Clean Workspace53        uses: AutoModality/action-clean@v1.1.05455      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it56      - uses: actions/checkout@v357        with:58          ref: ${{ github.head_ref }}  #Checking out head commit5960      - name: Read .env file61        uses: xom9ikk/dotenv@v1.0.26263      - name: Generate ENV related extend file for docker-compose64        uses: cuchi/jinja2-action@v1.2.065        with:66          template: .docker/docker-compose.tmp-dev.j267          output_file: .docker/docker-compose.${{ matrix.network }}.yml68          variables: |69            RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}70            FEATURE=${{ matrix.features }}71    7273      - name: Show build configuration74        run: cat .docker/docker-compose.${{ matrix.network }}.yml7576      - name: Build the stack77        run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans78 79      - name: Wait untill node-dev started.80        run: sleep 600s8182      - uses: actions/setup-node@v383        with:84          node-version: 168586      - name: Generate 87        working-directory: tests88        run: |89          yarn install90          yarn polkadot-types9192      - name: Checkou repo UniqueNetwork/unique-types-js93        uses: actions/checkout@v394        with:95          repository: 'UniqueNetwork/unique-types-js'96#          ssh-key: ${{ secrets.GH_PAT }}97          path: 'tests/unique-types-js'98#          ref: 'QA-65_maxandreev'99 100      - name: Copy files101        working-directory: tests102        run: |103          rsync -ar --exclude .gitignore src/interfaces/ unique-types-js104          for file in unique-types-js/augment-* unique-types-js/**/types.ts unique-types-js/registry.ts; do105              sed -i '1s;^;//@ts-nocheck\n;' $file106          done107108      - name: Enumerate files after generation109        working-directory: tests/unique-types-js110        run: |111          ls -la112113      - name: Enumerate files after generation114        working-directory: tests/115        run: |116          ls -la117118      - name: Upload JS types to repo119        working-directory: tests/unique-types-js120        run: |121          git config user.name github-actions122          git config user.email github-actions@github.com123          git add .124          git commit -m "chore: regenerate types"125126      - name: Push changes127        uses: ad-m/github-push-action@master128        with:129          github_token: ${{ secrets.GITHUB_TOKEN }}130          branch: ${{ matrix.branch }}131          repository: 'UniqueNetwork/unique-types-js'132          ssh: true133134      - name: Stop running containers135        if: always()                   # run this step always136        run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down