difftreelog
ci fix js-packages paths
in: master
18 files changed
.github/workflows/collator-selection.ymldiffbeforeafterboth--- a/.github/workflows/collator-selection.yml
+++ b/.github/workflows/collator-selection.yml
@@ -181,7 +181,7 @@
yarn add mochawesome
# Wanted by both wait_for_first_block
# export RPC_URL="${RELAY_SAPPHIRE_HTTP_URL:-${RELAY_OPAL_HTTP_URL:-${RELAY_QUARTZ_HTTP_URL:-${RELAY_UNIQUE_HTTP_URL:-}}}}"
- ../scripts/src/generate_types/wait_for_first_block.sh
+ ../scripts/wait_for_first_block.sh
echo "Ready to start tests"
NOW=$(date +%s) && yarn testCollators --reporter mochawesome --reporter-options reportFilename=test-collators-${NOW}
env:
.github/workflows/forkless-update-data.ymldiffbeforeafterboth--- a/.github/workflows/forkless-update-data.yml
+++ b/.github/workflows/forkless-update-data.yml
@@ -146,19 +146,19 @@
snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.latest.outputs.name }}'}})
- name: "Reconcile: runtime is upgraded"
- working-directory: tests
+ working-directory: js-packages/tests
run: |
yarn
- ./scripts/wait_for_first_block.sh
+ ../scripts/wait_for_first_block.sh
echo "Executing upgrade"
- yarn ts-node --esm src/util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm
+ yarn ts-node --esm util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
- name: Run Parallel tests after forkless upgrade
- working-directory: tests
+ working-directory: js-packages/tests
run: |
- ./scripts/wait_for_first_block.sh
+ ../scripts/wait_for_first_block.sh
echo "Ready to start tests"
NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
env:
@@ -166,7 +166,7 @@
- name: Run Sequential tests after forkless upgrade
if: success() || failure()
- working-directory: tests
+ working-directory: js-packages/tests
run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
.github/workflows/forkless-update-nodata.ymldiffbeforeafterboth1# https://cryptousetech.atlassian.net/wiki/spaces/CI/pages/2586837021/Forkless+update+without+data2# Forkless update without data replication34# Triger: only call from main workflow(re-usable workflows)5on:6 workflow_call:789# A workflow run is made up of one or more jobs that can run sequentially or in parallel10jobs:1112 prepare-execution-matrix:1314 name: execution matrix1516 runs-on: self-hosted-ci17 outputs:18 matrix: ${{ steps.create_matrix.outputs.matrix }}1920 steps:2122 - name: Clean Workspace23 uses: AutoModality/action-clean@v1.1.02425 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it26 - uses: actions/checkout@v3.1.027 with:28 ref: ${{ github.head_ref }} #Checking out head commit2930 - name: Read .env file31 uses: xom9ikk/dotenv@v23233 - name: Create Execution matrix34 uses: CertainLach/create-matrix-action@v435 id: create_matrix36 with:37 matrix: |38 network {opal}, mainnet_branch {${{ env.OPAL_MAINNET_BRANCH }}}, relay_branch {${{ env.UNIQUEWEST_MAINNET_BRANCH }}}, runtime_features {opal-runtime}, wasm_name {opal}39 network {sapphire}, mainnet_branch {${{ env.SAPPHIRE_MAINNET_BRANCH }}}, relay_branch {${{ env.UNIQUEEAST_MAINNET_BRANCH }}}, runtime_features {sapphire-runtime}, wasm_name {quartz}40 network {quartz}, mainnet_branch {${{ env.QUARTZ_MAINNET_BRANCH }}}, relay_branch {${{ env.KUSAMA_MAINNET_BRANCH }}}, runtime_features {quartz-runtime}, wasm_name {quartz}41 network {unique}, mainnet_branch {${{ env.UNIQUE_MAINNET_BRANCH }}}, relay_branch {${{ env.POLKADOT_MAINNET_BRANCH }}}, runtime_features {unique-runtime}, wasm_name {unique}4243 forkless-nodata:4445 needs: prepare-execution-matrix46 # The type of runner that the job will run on47 runs-on: [self-hosted-ci,large]4849 timeout-minutes: 13805051 name: ${{ matrix.network }}-nodata5253 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.5455 strategy:56 matrix:57 include: ${{fromJson(needs.prepare-execution-matrix.outputs.matrix)}}5859 steps:6061 - name: Clean Workspace62 uses: AutoModality/action-clean@v1.1.06364 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it65 - uses: actions/checkout@v3.1.066 with:67 ref: ${{ github.head_ref }} #Checking out head commit6869 # Prepare SHA 70 - name: Prepare SHA71 uses: ./.github/actions/prepare7273 - name: Read .env file74 uses: xom9ikk/dotenv@v27576 - name: Log in to Docker Hub77 uses: docker/login-action@v2.1.078 with:79 username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}80 password: ${{ secrets.CORE_DOCKERHUB_TOKEN }}8182 - name: Generate ENV related extend Dockerfile file for POLKADOT83 uses: cuchi/jinja2-action@v1.2.084 with:85 template: .docker/Dockerfile-polkadot.j286 output_file: .docker/Dockerfile-polkadot.${{ matrix.relay_branch }}.yml87 variables: |88 RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}89 POLKADOT_BUILD_BRANCH=${{ matrix.relay_branch }}90 91 - name: Prepare polkadot92 uses: ./.github/actions/buildContainer93 id: polkadot94 with:95 container: uniquenetwork/builder-polkadot96 tag: ${{ matrix.relay_branch }}97 context: .docker98 dockerfile: Dockerfile-polkadot.${{ matrix.relay_branch }}.yml99 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}100 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}101102 - name: Prepare mainnet103 uses: ./.github/actions/buildContainer104 id: mainnet105 with:106 container: uniquenetwork/ci-nodata-${{ matrix.network }}107 tag: ${{ matrix.mainnet_branch }}108 context: .docker109 dockerfile: Dockerfile-unique-release110 args: |111 --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }}112 --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}113 --build-arg UNIQUE_VERSION=${{ matrix.mainnet_branch }}114 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}115 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}116117 - name: Prepare latest118 uses: ./.github/actions/buildContainer119 id: latest120 with:121 container: uniquenetwork/ci-nodata-${{ matrix.network }}122 tag: ${{ env.REF_SLUG }}-${{ env.BUILD_SHA }}123 context: .124 dockerfile: .docker/Dockerfile-unique125 args: |126 --build-arg RUNTIME_FEATURES=${{ matrix.runtime_features }}127 --build-arg RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }}128 dockerhub_username: ${{ secrets.CORE_DOCKERHUB_USERNAME }}129 dockerhub_token: ${{ secrets.CORE_DOCKERHUB_TOKEN }}130131 - name: Extract wasms132 uses: ./.github/actions/extractDocker133 id: wasms134 with:135 image: ${{ steps.latest.outputs.name }}136 directory: /wasm137138 - uses: actions/setup-node@v3.5.1139 with:140 node-version: 18141142 - name: Install baedeker143 uses: UniqueNetwork/baedeker-action/setup@built144145 - name: Setup library146 run: mkdir -p .baedeker/vendor/ && git clone https://github.com/UniqueNetwork/baedeker-library .baedeker/vendor/baedeker-library147148 - name: Start network149 uses: UniqueNetwork/baedeker-action@built150 id: bdk151 with:152 jpath: |153 .baedeker/vendor154 tla-str: |155 relay_spec=rococo-local156 inputs: |157 .baedeker/node-only.jsonnet158 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/polkadot':{dockerImage:'${{ steps.polkadot.outputs.name }}'}})159 # nodata build uses old runtime, but new chain, thus we use mainnet image for spec generation, and then latest image for nodes.160 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.latest.outputs.name }}'}}, for_chain = false)161 snippet:(import 'baedeker-library/ops/rewrites.libsonnet').rewriteNodePaths({'bin/unique':{dockerImage:'${{ steps.mainnet.outputs.name }}'}})162163 - name: "Reconcile: runtime is upgraded"164 working-directory: tests165 run: |166 yarn167 ./scripts/wait_for_first_block.sh168 echo "Executing upgrade"169 yarn ts-node --esm src/util/authorizeEnactUpgrade.ts ${{ steps.wasms.outputs.dir }}/${{ matrix.wasm_name }}-runtime/${{ matrix.wasm_name }}_runtime.compact.compressed.wasm170 env:171 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}172173 - name: Run Parallel tests after forkless upgrade174 working-directory: tests175 run: |176 ./scripts/wait_for_first_block.sh177 echo "Ready to start tests"178 NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}179 env:180 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}181182 - name: Run Sequential tests after forkless upgrade183 if: success() || failure()184 working-directory: tests185 run: NOW=$(date +%s) && yarn testSequential --reporter mochawesome --reporter-options reportFilename=test-sequential-${NOW}186 env:187 RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}188189 - name: Remove builder cache190 if: always() # run this step always191 run: |192 docker system prune -f.github/workflows/governance.ymldiffbeforeafterboth--- a/.github/workflows/governance.yml
+++ b/.github/workflows/governance.yml
@@ -86,7 +86,7 @@
run: |
yarn install
yarn add mochawesome
- ../scripts/src/generate_types/wait_for_first_block.sh
+ ../scripts/wait_for_first_block.sh
echo "Ready to start tests"
NOW=$(date +%s) && yarn testGovernance --reporter mochawesome --reporter-options reportFilename=test-${NOW}
env:
.github/workflows/make-bench.ymldiffbeforeafterboth--- a/.github/workflows/make-bench.yml
+++ b/.github/workflows/make-bench.yml
@@ -43,16 +43,15 @@
time make bench
- name: Run node dev mode in background
- working-directory: ./
run: |
./target/release/unique-collator --dev &
- name: RUN Calibrate
- working-directory: ./tests
+ working-directory: js-packages/scripts
run: |
- yarn install
- yarn ts-node --esm src/calibrate.ts
- yarn ts-node --esm src/calibrateApply.ts
+ yarn
+ yarn ts-node --esm calibrate.ts
+ yarn ts-node --esm calibrateApply.ts
- name: show git diff
run: |
.github/workflows/market-test.ymldiffbeforeafterboth--- a/.github/workflows/market-test.yml
+++ b/.github/workflows/market-test.yml
@@ -119,10 +119,10 @@
# Temporary disable node readyness check. Have to dig into the script logic.
# - name: Wait for chain up and running
-# working-directory: tests
+# working-directory: js-packages/tests
# run: |
# yarn install
-# ./scripts/wait_for_first_block.sh
+# ../scripts/wait_for_first_block.sh
# echo "Ready to start tests"
# env:
# RPC_URL: http://127.0.0.1:9944/
.github/workflows/node-only-update.ymldiffbeforeafterboth--- a/.github/workflows/node-only-update.yml
+++ b/.github/workflows/node-only-update.yml
@@ -170,6 +170,7 @@
run: |
yarn
yarn add mochawesome
+ # TODO: Update to new script structure after mainnet will have it
./scripts/wait_for_first_block.sh
echo "Ready to start tests"
NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
@@ -197,7 +198,7 @@
- name: Ensure network is alive
if: success()
run: |
- ./tests/scripts/wait_for_first_block.sh
+ ./js-packages/scripts/wait_for_first_block.sh
env:
RPC_URL: ${{ env.RELAY_UNIQUE_HTTP_URL }}
@@ -217,6 +218,7 @@
run: |
yarn install
yarn add mochawesome
+ # TODO: Update to new script structure after mainnet will have it
./scripts/wait_for_first_block.sh
echo "Ready to start tests"
NOW=$(date +%s) && yarn testParallel --reporter mochawesome --reporter-options reportFilename=test-parallel-${NOW}
.github/workflows/polkadot-types.ymldiffbeforeafterboth--- a/.github/workflows/polkadot-types.yml
+++ b/.github/workflows/polkadot-types.yml
@@ -74,13 +74,13 @@
# run: sudo apt install jq -y
- name: Run generate_types_package script
- working-directory: tests
+ working-directory: js-packages
run: |
yarn install
- /bin/bash ./scripts/generate_types/wait_for_first_block.sh
+ ./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/generate_types_package.sh --release ${{ matrix.usage }} --push
+ ./scripts/generate_types/generate_types_package.sh --release ${{ matrix.usage }} --push
env:
RPC_URL: http://127.0.0.1:9944/
.github/workflows/xcm.ymldiffbeforeafterboth--- a/.github/workflows/xcm.yml
+++ b/.github/workflows/xcm.yml
@@ -327,22 +327,22 @@
retention-days: 2
- name: Yarn install
- working-directory: tests
+ working-directory: js-packages/tests
run: |
yarn install
yarn add mochawesome
- name: Call HRMP initialization
- working-directory: tests
+ working-directory: js-packages/tests
run: |
- yarn ts-node --esm src/util/createHrmp.ts ${{matrix.network}}
+ yarn ts-node --esm util/createHrmp.ts ${{matrix.network}}
- name: Run XCM tests
working-directory: js-packages/tests
run: |
# Wanted by both wait_for_first_block
export RPC_URL="${RELAY_OPAL_HTTP_URL:-${RELAY_QUARTZ_HTTP_URL:-${RELAY_UNIQUE_HTTP_URL:-}}}"
- ../scripts/src/generate_types/wait_for_first_block.sh
+ ../scripts/wait_for_first_block.sh
echo "Ready to start tests"
NOW=$(date +%s) && yarn ${{ matrix.runtest }} --reporter mochawesome --reporter-options reportFilename=test-${NOW}
.github/workflows/yarn-dev.ymldiffbeforeafterboth--- a/.github/workflows/yarn-dev.yml
+++ b/.github/workflows/yarn-dev.yml
@@ -66,7 +66,7 @@
run: |
yarn install
yarn add mochawesome
- ../scripts/src/generate_types/wait_for_first_block.sh
+ ../scripts/wait_for_first_block.sh
echo "Ready to start tests"
NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}
env:
@@ -90,13 +90,13 @@
working-directory: js-packages/scripts
run: |
yarn install
- npx ts-node --esm ./src/benchmarks/mintFee/index.ts
+ npx ts-node --esm ./benchmarks/mintFee/index.ts
- name: Run benchmark opsFee tests
working-directory: js-packages/scripts
run: |
yarn install
- npx ts-node --esm ./src/benchmarks/opsFee/index.ts
+ npx ts-node --esm ./benchmarks/opsFee/index.ts
- name: Stop running containers
if: always() # run this step always
Makefilediffbeforeafterboth--- a/Makefile
+++ b/Makefile
@@ -7,25 +7,25 @@
@echo " bench-unique"
NATIVE_FUNGIBLE_EVM_STUBS=./pallets/balances-adapter/src/stubs
-NATIVE_FUNGIBLE_EVM_ABI=./js-packages/tests/src/eth/abi/nativeFungible.json
+NATIVE_FUNGIBLE_EVM_ABI=./js-packages/tests/eth/abi/nativeFungible.json
FUNGIBLE_EVM_STUBS=./pallets/fungible/src/stubs
-FUNGIBLE_EVM_ABI=./js-packages/tests/src/eth/abi/fungible.json
+FUNGIBLE_EVM_ABI=./js-packages/tests/eth/abi/fungible.json
NONFUNGIBLE_EVM_STUBS=./pallets/nonfungible/src/stubs
-NONFUNGIBLE_EVM_ABI=./js-packages/tests/src/eth/abi/nonFungible.json
+NONFUNGIBLE_EVM_ABI=./js-packages/tests/eth/abi/nonFungible.json
REFUNGIBLE_EVM_STUBS=./pallets/refungible/src/stubs
-REFUNGIBLE_EVM_ABI=./js-packages/tests/src/eth/abi/reFungible.json
-REFUNGIBLE_TOKEN_EVM_ABI=./js-packages/tests/src/eth/abi/reFungibleToken.json
+REFUNGIBLE_EVM_ABI=./js-packages/tests/eth/abi/reFungible.json
+REFUNGIBLE_TOKEN_EVM_ABI=./js-packages/tests/eth/abi/reFungibleToken.json
CONTRACT_HELPERS_STUBS=./pallets/evm-contract-helpers/src/stubs/
-CONTRACT_HELPERS_ABI=./js-packages/tests/src/eth/abi/contractHelpers.json
+CONTRACT_HELPERS_ABI=./js-packages/tests/eth/abi/contractHelpers.json
COLLECTION_HELPER_STUBS=./pallets/unique/src/eth/stubs/
-COLLECTION_HELPER_ABI=./js-packages/tests/src/eth/abi/collectionHelpers.json
+COLLECTION_HELPER_ABI=./js-packages/tests/eth/abi/collectionHelpers.json
-TESTS_API=./js-packages/tests/src/eth/api/
+TESTS_API=./js-packages/tests/eth/api/
.PHONY: regenerate_solidity
regenerate_solidity: UniqueFungible.sol UniqueNFT.sol UniqueRefungible.sol UniqueRefungibleToken.sol ContractHelpers.sol CollectionHelpers.sol
doc/separate_rpc.mddiffbeforeafterboth--- a/doc/separate_rpc.md
+++ b/doc/separate_rpc.md
@@ -77,7 +77,7 @@
* runtime/quartz/Cargo.toml
* runtime/unique/Cargo.toml
-7. Create tests/src/interfaces/ModuleName/definitions.ts and describe the necessary methods in it.
+7. Create js-packages/types/ModuleName/definitions.ts and describe the necessary methods in it.
```ts
type RpcParam = {
name: string;
@@ -105,19 +105,19 @@
};
```
-8. Describe definitions from paragraph 7 in tests/src/interfaces/definitions.ts.
+8. Describe definitions from paragraph 7 in js-packages/types/definitions.ts.
```ts
export {default as ModuleName} from './module/definitions';
```
-9. tests/src/substrate/substrate-api.ts
+9. js-packages/tests/substrate/substrate-api.ts
* Set the RPC interface in the `defaultApiOptions` function, add an entry in the `rpc` parameter
```ts
module: defs.module.rpc,
```
-10. tests/src/util/playgrounds/unique.dev.ts
+10. js-packages/playgrounds/unique.dev.ts
* Specify RPC interface in `connect` function, add entry in `rpc` parameter
```ts
module: defs.module.rpc,
- ```
\ No newline at end of file
+ ```
js-packages/.dockerignorediffbeforeafterboth--- a/js-packages/.dockerignore
+++ b/js-packages/.dockerignore
@@ -1,2 +1 @@
node_modules/
-Dockerfile-tests
js-packages/Dockerfile-testsdiffbeforeafterboth--- a/js-packages/Dockerfile-tests
+++ /dev/null
@@ -1,38 +0,0 @@
-# ===== Integration Tests ======
-
-
-FROM ubuntu:22.04
-LABEL maintainer="UniqueNetwork.io"
-
-RUN apt -y update; apt -y upgrade; apt -y install curl
-
-
-RUN mkdir unique_parachain
-WORKDIR /unique_parachain
-
-RUN apt-get -y update && \
- apt-get -y upgrade && \
- apt-get -y install curl jq && \
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash && \
- export NVM_DIR="$HOME/.nvm" && \
- [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
- nvm install v16.2.0 && \
- nvm alias default v16.2.0 && \
- nvm use default
-
-ENV YARN_CACHE_FOLDER ~/.yarn
-
-COPY package.json yarn.lock ./
-
-RUN export NVM_DIR="$HOME/.nvm" && \
- [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
- npm install --global yarn && \
- yarn add mochawesome && \
- yarn --pure-lockfile
-
-COPY . .
-
-CMD export NVM_DIR="$HOME/.nvm" && \
- [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
- ./scripts/wait_for_first_block.sh && \
- NOW=$(date +%s) && yarn test --reporter mochawesome --reporter-options reportFilename=test-${NOW}
js-packages/scripts/benchmarks/mintFee/index.tsdiffbeforeafterboth--- a/js-packages/scripts/benchmarks/mintFee/index.ts
+++ b/js-packages/scripts/benchmarks/mintFee/index.ts
@@ -14,23 +14,23 @@
export const CONTRACT_IMPORT: ContractImports[] = [
{
- fsPath: `${dirname}/../../../../tests/eth/api/CollectionHelpers.sol`,
+ fsPath: `${dirname}/../../../tests/eth/api/CollectionHelpers.sol`,
solPath: 'eth/api/CollectionHelpers.sol',
},
{
- fsPath: `${dirname}/../../../../tests/eth/api/ContractHelpers.sol`,
+ fsPath: `${dirname}/../../../tests/eth/api/ContractHelpers.sol`,
solPath: 'eth/api/ContractHelpers.sol',
},
{
- fsPath: `${dirname}/../../../../tests/eth/api/UniqueRefungibleToken.sol`,
+ fsPath: `${dirname}/../../../tests/eth/api/UniqueRefungibleToken.sol`,
solPath: 'eth/api/UniqueRefungibleToken.sol',
},
{
- fsPath: `${dirname}/../../../../tests/eth/api/UniqueRefungible.sol`,
+ fsPath: `${dirname}/../../../tests/eth/api/UniqueRefungible.sol`,
solPath: 'eth/api/UniqueRefungible.sol',
},
{
- fsPath: `${dirname}/../../../../tests/eth/api/UniqueNFT.sol`,
+ fsPath: `${dirname}/../../../tests/eth/api/UniqueNFT.sol`,
solPath: 'eth/api/UniqueNFT.sol',
},
];
js-packages/scripts/package.jsondiffbeforeafterboth--- a/js-packages/scripts/package.json
+++ b/js-packages/scripts/package.json
@@ -14,10 +14,10 @@
"tslib": "^2.6.2"
},
"scripts": {
- "benchMintingFee": "ts-node src/benchmarks/mintFee/benchmark.ts",
- "loadTransfer": "ts-node src/transfer.nload.ts",
- "generateEnv": "ts-node --esm ./src/generateEnv.ts",
- "propose-upgrade": "ts-node --esm ./src/proposeupgrade.ts",
- "propose-fast-track": "ts-node --esm ./src/proposefasttrack.ts"
+ "benchMintingFee": "ts-node benchmarks/mintFee/benchmark.ts",
+ "loadTransfer": "ts-node transfer.nload.ts",
+ "generateEnv": "ts-node --esm ./generateEnv.ts",
+ "propose-upgrade": "ts-node --esm ./proposeupgrade.ts",
+ "propose-fast-track": "ts-node --esm ./proposefasttrack.ts"
}
}
js-packages/scripts/wait_for_first_block.shdiffbeforeafterboth--- /dev/null
+++ b/js-packages/scripts/wait_for_first_block.sh
@@ -0,0 +1,43 @@
+#!/usr/bin/env bash
+
+DIR=$(dirname "$0")
+
+. "$DIR/functions.sh"
+
+last_block_id=0
+block_id=0
+function get_block {
+ block_id_hex=$(do_rpc chain_getHeader | jq -r .result.number)
+ block_id=$((block_id_hex))
+ echo Id = $block_id
+}
+
+function had_new_block {
+ last_block_id=$block_id
+ get_block
+ if (( last_block_id != 0 && block_id > last_block_id )); then
+ return 0
+ fi
+ return 1
+}
+
+function reset_check {
+ last_block_id=0
+ block_id=0
+}
+
+while ! had_new_block; do
+ echo "Waiting for next block..."
+ sleep 12
+done
+reset_check
+
+echo "Chain is running, but lets wait for another block after a minute, to avoid startup flakiness."
+sleep 60
+
+while ! had_new_block; do
+ echo "Waiting for another block..."
+ sleep 12
+done
+
+echo "Chain is running!"
js-packages/tests/package.jsondiffbeforeafterboth--- a/js-packages/tests/package.json
+++ b/js-packages/tests/package.json
@@ -26,6 +26,10 @@
"_test": "yarn setup && mocha --timeout 9999999 --loader=ts-node/esm.mjs",
"_testParallel": "yarn setup && mocha --timeout 9999999 --parallel --loader=ts-node/esm.mjs",
"test": "yarn _test './**/*.*test.ts'",
+ "testParallel": "yarn _testParallel './**/*.test.ts'",
+ "testSequential": "yarn _test './**/*.seqtest.ts'",
+ "testGovernance": "RUN_GOV_TESTS=1 yarn _test ./**/governance/*.*test.ts",
+ "testCollators": "RUN_COLLATOR_TESTS=1 yarn _test ./**/collator-selection/**.*test.ts --timeout 49999999",
"load": "yarn _test './**/*.load.ts'"
}
}