Skip to content

Commit

Permalink
Update local type generation scripts (#2968)
Browse files Browse the repository at this point in the history
* new update script
* use workspace in test pkg
* add script to test/scripts
* run node on correct port
* bump polkadot versions on ts-api
* bump polkadot versions on all pkgs
* fix script & build for all runtimes
* fix cache dep path
* helpers/block: query ext as u8a
* use as u8a for dummyTranfer info
* add prepare ts api step to zombie-tests
* add ts api build step to lazyloading & chopsticks
* add more wait time for nodes to start
* update script to use live nodes
* update ts-api
* update script to use dev chains
  • Loading branch information
pLabarta authored Oct 29, 2024
1 parent 35a788b commit 07306c4
Show file tree
Hide file tree
Showing 50 changed files with 5,463 additions and 8,461 deletions.
2 changes: 1 addition & 1 deletion .github/workflow-templates/dev-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ runs:
with:
node-version: 20.10.0
cache: "pnpm"
cache-dependency-path: test/pnpm-lock.yaml
cache-dependency-path: pnpm-lock.yaml

- name: Setup Moonbeam PolkadotJS types
shell: bash
Expand Down
51 changes: 48 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ jobs:
with:
node-version: 20.10.0
cache: "pnpm"
cache-dependency-path: test/pnpm-lock.yaml
cache-dependency-path: pnpm-lock.yaml
- name: Run Eslint check
run: |
cd test
Expand Down Expand Up @@ -613,7 +613,7 @@ jobs:
with:
node-version: 20.10.0
cache: "pnpm"
cache-dependency-path: test/pnpm-lock.yaml
cache-dependency-path: pnpm-lock.yaml
- run: |
mkdir -p target/release
- name: "Download branch built node"
Expand Down Expand Up @@ -739,6 +739,21 @@ jobs:
with:
name: moonbeam
path: target/release
- name: Setup Moonbeam PolkadotJS types
shell: bash
run: |
#### Preparing the legacy types
cd moonbeam-types-bundle
pnpm i
pnpm build
#### Preparing the typescript api
cd ../typescript-api
pnpm i
pnpm build
cd ../test
pnpm add ../typescript-api
- name: "Run lazy loading tests"
run: |
chmod uog+x target/release/moonbeam
Expand Down Expand Up @@ -782,7 +797,7 @@ jobs:
with:
node-version: 20.10.0
cache: "pnpm"
cache-dependency-path: test/pnpm-lock.yaml
cache-dependency-path: pnpm-lock.yaml
- name: Create local folders
run: |
mkdir -p target/release/wbuild/${{ matrix.chain }}-runtime/
Expand All @@ -792,6 +807,21 @@ jobs:
with:
name: runtimes
path: target/release/wbuild/${{ matrix.chain }}-runtime/
- name: Setup Moonbeam PolkadotJS types
shell: bash
run: |
#### Preparing the legacy types
cd moonbeam-types-bundle
pnpm i
pnpm build
#### Preparing the typescript api
cd ../typescript-api
pnpm i
pnpm build
cd ../test
pnpm add ../typescript-api
- name: "Install and run upgrade test"
run: |
cd test
Expand Down Expand Up @@ -854,6 +884,21 @@ jobs:
docker create --name moonbeam_container $DOCKER_TAG bash
docker cp moonbeam_container:moonbeam/moonbeam test/tmp/moonbeam_rt
docker rm -f moonbeam_container
- name: Setup Moonbeam PolkadotJS types
shell: bash
run: |
#### Preparing the legacy types
cd moonbeam-types-bundle
pnpm i
pnpm build
#### Preparing the typescript api
cd ../typescript-api
pnpm i
pnpm build
cd ../test
pnpm add ../typescript-api
- name: Prepare Chainspecs
run: |
cd test
Expand Down
12 changes: 6 additions & 6 deletions moonbeam-types-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
"url": "git+https://github.com/moonbeam-foundation/moonbeam.git"
},
"dependencies": {
"@polkadot/api": "13.0.1",
"@polkadot/api-base": "13.0.1",
"@polkadot/rpc-core": "13.0.1",
"@polkadot/typegen": "13.0.1",
"@polkadot/types": "13.0.1",
"@polkadot/types-codec": "13.0.1",
"@polkadot/api": "14.0.1",
"@polkadot/api-base": "14.0.1",
"@polkadot/rpc-core": "14.0.1",
"@polkadot/typegen": "14.0.1",
"@polkadot/types": "14.0.1",
"@polkadot/types-codec": "14.0.1",
"prettier": "2.8.8",
"typescript": "5.6.2"
}
Expand Down
Loading

0 comments on commit 07306c4

Please sign in to comment.