Skip to content

Commit

Permalink
workflows in new v1/v2 workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
pyramation committed Oct 9, 2024
1 parent 27911c0 commit f5832ea
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 29 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/codegen-main-dryrun.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Codegen Main Dry Run

on:

workflow_dispatch:

jobs:
Expand All @@ -25,23 +24,28 @@ jobs:
- name: Install Dependencies 🧶
run: |
cd v1
yarn install
yarn symlink
- name: Build Project 🏗️
run: |
cd v1
yarn build
yarn symlink
- name: Code Generation 🛠
run: |
cd v1
yarn codegen
cd ..
git add .
if ! git diff --staged --quiet; then
echo "GIT_RESULT=Changes detected." >> $GITHUB_ENV
else
echo "GIT_RESULT=No changes to commit." >> $GITHUB_ENV
fi
- name: Git Changes Result
run: |
echo $GIT_RESULT
echo $GIT_RESULT
8 changes: 7 additions & 1 deletion .github/workflows/codegen-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,20 @@ jobs:
- name: Install Dependencies 🧶
run: |
cd v1
yarn install
yarn symlink
- name: Build Project 🏗️
run: |
cd v1
yarn build
yarn symlink
- name: Code Generation 🛠
run: |
cd v1
# Code generation and build for various packages
pushd packages/chain-registry
yarn codegen
Expand All @@ -56,6 +60,8 @@ jobs:
yarn codegen
popd
cd ..
# Stage all changes and commit if there are any changes
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
Expand All @@ -73,4 +79,4 @@ jobs:
echo $GIT_RESULT
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_SECRET}}
GH_TOKEN: ${{ secrets.GH_LERNA_PUBLISH_TOKEN }}
GH_TOKEN: ${{ secrets.GH_LERNA_PUBLISH_TOKEN }}
17 changes: 12 additions & 5 deletions .github/workflows/codegen-types-dryrun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,49 +20,56 @@ jobs:

- name: Update Git Submodules 🔄
run: |
make udpate-cosmos
make update-cosmos # Fixed typo here
- name: Install Dependencies 🧶
run: |
cd v2
yarn install
yarn symlink
- name: Build Project 🏗️
run: |
cd v2
yarn build
yarn symlink
- name: Types Generation 🛠
run: |
cd v2
# Generate types and interfaces
pushd workflows/generate-types
yarn generate:types
yarn generate:interfaces
popd
# Build types
pushd v2/types
pushd packages/types
yarn build
popd
# Build interfaces
pushd v2/interfaces
pushd packages/interfaces
yarn build
popd
# Generate and build code for chain registry
pushd v2/chain-registry
pushd packages/chain-registry
yarn codegen
yarn build
popd
cd ..
# check changes
git add .
if ! git diff --staged --quiet; then
echo "GIT_RESULT=Changes to commit and/or publish." >> $GITHUB_ENV
else
echo "GIT_RESULT=No changes to commit." >> $GITHUB_ENV
fi
- name: Git Result
run: |
echo $GIT_RESULT
echo $GIT_RESULT
14 changes: 10 additions & 4 deletions .github/workflows/codegen-types.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,44 @@ jobs:
- name: Install Dependencies 🧶
run: |
cd v2
yarn install
yarn symlink
- name: Build Project 🏗️
run: |
cd v2
yarn build
yarn symlink
- name: Types Generation 🛠
run: |
cd v2
# Generate types and interfaces
pushd workflows/generate-types
yarn generate:types
yarn generate:interfaces
popd
# Build types
pushd v2/types
pushd packages/types
yarn build
popd
# Build interfaces
pushd v2/interfaces
pushd packages/interfaces
yarn build
popd
# Generate and build code for chain registry
pushd v2/chain-registry
pushd packages/chain-registry
yarn codegen
yarn build
popd
cd ..
# Stage all changes and commit if there are any changes
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
Expand All @@ -73,4 +79,4 @@ jobs:
echo $GIT_RESULT
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_SECRET}}
GH_TOKEN: ${{ secrets.GH_LERNA_PUBLISH_TOKEN }}
GH_TOKEN: ${{ secrets.GH_LERNA_PUBLISH_TOKEN }}
20 changes: 17 additions & 3 deletions .github/workflows/lerna-publish-minor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:

jobs:
publish-npm:
name: Publish Minor Versions
runs-on: ubuntu-latest
steps:
- name: Checkout Repository 🛎️
Expand All @@ -18,12 +19,25 @@ jobs:
node-version: '20.x'
registry-url: https://registry.npmjs.org/

- name: Publish Minor Version
- name: Configure Git
run: |
yarn
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor}}@users.noreply.github.com"
lerna publish minor --force-publish=chain-registry --no-verify-access --yes
- name: Publish v1 Minor Version
run: |
cd v1
yarn
yarn lerna publish minor --force-publish=chain-registry --no-verify-access --yes
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_SECRET}}
GH_TOKEN: ${{ secrets.GH_LERNA_PUBLISH_TOKEN }}

- name: Publish v2 Minor Version
run: |
cd v2
yarn
yarn lerna publish minor --force-publish=chain-registry --no-verify-access --yes
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_SECRET}}
GH_TOKEN: ${{ secrets.GH_LERNA_PUBLISH_TOKEN }}
20 changes: 17 additions & 3 deletions .github/workflows/lerna-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:

jobs:
publish-npm:
name: Publish Versions
runs-on: ubuntu-latest
steps:
- name: Checkout Repository 🛎️
Expand All @@ -23,12 +24,25 @@ jobs:
node-version: '20.x'
registry-url: https://registry.npmjs.org/

- name: Publish Patch Version
- name: Configure Git
run: |
yarn
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor}}@users.noreply.github.com"
lerna publish --force-publish=chain-registry --no-verify-access --yes
- name: Publish v1 Version
run: |
cd v1
yarn
yarn lerna publish --force-publish=chain-registry --no-verify-access --yes
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_SECRET}}
GH_TOKEN: ${{ secrets.GH_LERNA_PUBLISH_TOKEN }}

- name: Publish v2 Version
run: |
cd v2
yarn
yarn lerna publish --force-publish=chain-registry --no-verify-access --yes
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLISH_SECRET}}
GH_TOKEN: ${{ secrets.GH_LERNA_PUBLISH_TOKEN }}
28 changes: 17 additions & 11 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,39 +25,45 @@ jobs:
run: |
make update-fixtures
- name: Install Dependencies 🧶
- name: Install and Build v1 🏗️
run: |
cd v1
yarn install
yarn symlink
yarn build
yarn symlink
- name: Build Project 🏗️
- name: Install and Build v2 🏗️
run: |
cd v2
yarn install
yarn symlink
yarn build
yarn symlink
- name: Test @chain-registry/keplr 🔍
run: cd legacy/keplr && yarn test
run: cd v1/packages/keplr && yarn test

- name: Legacy Test @chain-registry/cosmostation 🔍
run: cd legacy/cosmostation && yarn test
run: cd v1/packages/cosmostation && yarn test

- name: Test @chain-registry/v2-cosmostation 🔍
run: cd v2/cosmostation && yarn test
run: cd v2/packages/cosmostation && yarn test

- name: Legacy Test @chain-registry/utils 🔍
run: cd legacy/utils && yarn test
run: cd v1/packages/utils && yarn test

- name: Test @chain-registry/utils 🔍
run: cd v2/utils && yarn test
run: cd v2/packages/utils && yarn test

- name: Legacy Test @chain-registry/client 🔍
run: cd legacy/client && yarn test
run: cd v1/packages/client && yarn test

- name: Test @chain-registry/client 🔍
run: cd v2/client && yarn test
run: cd v2/packages/client && yarn test

- name: Test @chain-registry/workflows 🔍
run: cd workflows/workflows && yarn test
run: cd v2/workflows/workflows && yarn test

- name: Test @chain-registry/cli 🔍
run: cd workflows/cli && yarn test
run: cd v2/workflows/cli && yarn test

0 comments on commit f5832ea

Please sign in to comment.