difftreelog
Update autogen-js-types.yml
in: master
1 file changed
.github/workflows/autogen-js-types.ymldiffbeforeafterboth1name: 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 working-directory: tests/unique-types-js125 uses: ad-m/github-push-action@master126 with:127 github_token: ${{ secrets.GITHUB_TOKEN }}128 branch: ${{ github.ref }}129130 - name: Stop running containers131 if: always() # run this step always132 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down1name: 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 ssh: true129 130 - name: Stop running containers131 if: always() # run this step always132 run: docker-compose -f ".docker/docker-compose-dev.yaml" -f ".docker/docker-compose.${{ matrix.network }}.yml" down