difftreelog
Merge pull request #796 from UniqueNetwork/feature/generate-types-package
in: master
Feature/generate types package
3 files changed
.github/workflows/ci-master.ymldiffbeforeafterboth--- a/.github/workflows/ci-master.yml
+++ b/.github/workflows/ci-master.yml
@@ -42,3 +42,6 @@
codestyle:
uses: ./.github/workflows/codestyle.yml
+
+ polkadot-types:
+ uses: ./.github/workflows/polkadot-types.yml
\ No newline at end of file
.github/workflows/polkadot-types.ymldiffbeforeafterboth--- /dev/null
+++ b/.github/workflows/polkadot-types.yml
@@ -0,0 +1,96 @@
+# Integration test in --dev mode
+# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586411104/Integration+tests
+name: Polkadot types
+
+# Triger: only call from main workflow(re-usable workflows)
+on:
+ workflow_call:
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+# on:
+# pull_request:
+# branches: [ 'develop' ]
+# types: [ opened, reopened, synchronize, ready_for_review, converted_to_draft ]
+
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+
+ polkadot_generate_types:
+ # The type of runner that the job will run on
+ runs-on: [self-hosted-ci,medium]
+ timeout-minutes: 1380
+
+ name: ${{ matrix.network }}
+
+ 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.
+
+ strategy:
+ matrix:
+ include:
+ - network: sapphire
+ usage: "--sapphire"
+ - network: "opal"
+ usage: ""
+ - network: "quartz"
+ usage: ""
+ - network: "unique"
+ usage: ""
+
+ steps:
+
+ - name: Clean Workspace
+ uses: AutoModality/action-clean@v1.1.0
+
+ # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
+ - uses: actions/checkout@v3
+ with:
+ ref: ${{ github.head_ref }} #Checking out head commit
+
+ - name: Read .env file
+ uses: xom9ikk/dotenv@v2
+
+ - name: Generate ENV related extend file for docker-compose
+ uses: cuchi/jinja2-action@v1.2.0
+ with:
+ template: .docker/docker-compose.tmp-dev.j2
+ output_file: .docker/docker-compose.${{ matrix.network }}.yml
+ variables: |
+ RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}
+ NETWORK=${{ matrix.network }}
+
+ - name: Show build configuration
+ run: cat .docker/docker-compose.${{ matrix.network }}.yml
+
+ - name: Build the stack
+ run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" up -d --build --remove-orphans
+
+ - uses: actions/setup-node@v3
+ with:
+ node-version: 16
+
+ - name: Install jq
+ run: sudo apt install jq -y
+
+ - name: Run generate_types_package script
+ working-directory: tests
+ run: |
+ yarn install
+ /bin/bash ./scripts/wait_for_first_block.sh
+ git config --global user.name "Unique"
+ git config --global user.email github-actions@usetech.com
+ /bin/bash ./scripts/generate_types_package.sh --release ${{ matrix.usage }} --push
+ env:
+ RPC_URL: http://127.0.0.1:9933/
+
+ - name: Stop running containers
+ if: always() # run this step always
+ run: docker-compose -f ".docker/docker-compose.${{ matrix.network }}.yml" down
+
+ - name: Remove builder cache
+ if: always() # run this step always
+ run: |
+ docker builder prune -f -a
+ docker system prune -f
+ docker image prune -f -a
.github/workflows/schedule-trigger-for-develop-build.ymldiffbeforeafterboth1name: schedule-trigger-for-develop-build1name: schedule-trigger-for-develop-build2on:2on:3 # update the branch ci/develop-scheduler every night3 # update the branch ci/develop-scheduler every night4 schedule:4 # schedule:5 - cron: '0 1 * * *'5 # - cron: '0 1 * * *'6 # or update the branch manually6 # or update the branch manually7 workflow_dispatch:7 workflow_dispatch:8 # pull_request:8 # pull_request:9 # branches: [ 'develop' ]9 # branches: [ 'develop' ]