Skip to content

Commit

Permalink
pkg updates and threading (#420)
Browse files Browse the repository at this point in the history
* pkg updates

* changes

* fmt

* better errors

* replace node-fetch

* removed node-fetch

* lint

* test sharding

* idea

* fix build

* node 22

* node 22

* move back to node20 again :(

* refactor to builder

* changeset
  • Loading branch information
timbrinded authored Jul 5, 2024
1 parent a5d76fc commit bad99a1
Show file tree
Hide file tree
Showing 25 changed files with 4,414 additions and 7,028 deletions.
9 changes: 9 additions & 0 deletions .changeset/green-sloths-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@moonwall/types": patch
"@moonwall/util": patch
"@moonwall/cli": patch
"@moonwall/docs": patch
"@moonwall/tests": patch
---

Change to forks
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.12.2
node-version: 20
cache: pnpm
- name: Setup Pages
uses: actions/configure-pages@v3
Expand Down
24 changes: 13 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
version: 9.1.4
- uses: actions/setup-node@v4
with:
node-version: 20.12.2
node-version: 20
cache: "pnpm"
- run: pnpm install
- run: pnpm run build
Expand All @@ -30,7 +30,7 @@ jobs:
version: 9.1.4
- uses: actions/setup-node@v4
with:
node-version: 20.12.2
node-version: 20
cache: "pnpm"
- run: pnpm install
- run: pnpm run lint
Expand All @@ -44,7 +44,7 @@ jobs:
version: 9.1.4
- uses: actions/setup-node@v4
with:
node-version: 20.12.2
node-version: 20
cache: "pnpm"
- run: pnpm install
- run: pnpm run fmt
Expand All @@ -59,7 +59,7 @@ jobs:
version: 9.1.4
- uses: actions/setup-node@v4
with:
node-version: 20.12.2
node-version: 20
cache: "pnpm"
- uses: oven-sh/setup-bun@v1
with:
Expand All @@ -86,7 +86,7 @@ jobs:
version: 9.1.4
- uses: actions/setup-node@v4
with:
node-version: 20.12.2
node-version: 20
cache: "pnpm"
- name: Build like before
run: |
Expand All @@ -107,10 +107,13 @@ jobs:
test_dev:
runs-on: ubuntu-latest
needs: ["build"]
env:
NODE_OPTIONS: "--no-deprecation"
strategy:
fail-fast: false
matrix:
suite: ["dev_test", "dev_multi", "dev_seq", "dev_smoke"]
shard: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
Expand All @@ -121,7 +124,7 @@ jobs:
version: 9.1.4
- uses: actions/setup-node@v4
with:
node-version: 20.12.2
node-version: 20
cache: "pnpm"
- name: Build like before
run: |
Expand All @@ -137,7 +140,7 @@ jobs:
- name: Run ${{matrix.suite}} dev test
run: |
cd test
bun moonwall test ${{matrix.suite}}
bun moonwall test ${{matrix.suite}} --ts ${{ matrix.shard }}/4
test_chopsticks:
runs-on: ubuntu-latest
Expand All @@ -153,7 +156,7 @@ jobs:
version: 9.1.4
- uses: actions/setup-node@v4
with:
node-version: 20.12.2
node-version: 20
cache: "pnpm"
- name: Build like before
run: |
Expand Down Expand Up @@ -191,7 +194,7 @@ jobs:
version: 9.1.4
- uses: actions/setup-node@v4
with:
node-version: 20.12.2
node-version: 20
cache: "pnpm"
- name: Build like before
run: |
Expand Down Expand Up @@ -222,7 +225,7 @@ jobs:
version: 9.1.4
- uses: actions/setup-node@v4
with:
node-version: 20.12.2
node-version: 20
cache: "pnpm"
- uses: oven-sh/setup-bun@v1
with:
Expand All @@ -244,4 +247,3 @@ jobs:
run: |
cd test
bun moonwall test ${{matrix.suite}}
2 changes: 1 addition & 1 deletion .github/workflows/manual-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
version: 9.1.4
- uses: actions/setup-node@v4
with:
node-version: 20.12.2
node-version: 20
cache: "pnpm"
- run: pnpm install
- run: pnpm run build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
version: 9.1.4
- uses: actions/setup-node@v4
with:
node-version: 20.12.2
node-version: 20
cache: "pnpm"
- run: pnpm install
- run: pnpm run build
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ cache
artifacts
**/tmp/*
**/contracts/out/*


.idea
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"type": "module",
"version": "0.3.0",
"private": true,
"packageManager": "[email protected]",
"description": "Testing framework for the Moon family of projects",
"scripts": {
"build": "pnpm -r --filter='./packages/**' run build",
Expand All @@ -23,8 +22,8 @@
"typecheck": "pnpm -r --filter='./packages/**' run typecheck"
},
"devDependencies": {
"@biomejs/biome": "1.8.0",
"@changesets/cli": "2.27.5",
"typescript": "5.4.5"
"@biomejs/biome": "1.8.3",
"@changesets/cli": "2.27.7",
"typescript": "5.5.3"
}
}
2 changes: 1 addition & 1 deletion packages/cli/biome.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"$schema": "https://biomejs.dev/schemas/1.5.3/schema.json",
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"extends": ["../../biome.json"]
}
2 changes: 1 addition & 1 deletion packages/cli/moonwall.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env -S node --no-warnings
#!/usr/bin/env -S node --no-warnings --no-deprecation

import './dist/internal/logging.js'
import './dist/cmds/entrypoint.js'
39 changes: 19 additions & 20 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,20 @@
"prepublish": "pnpm run build && pnpm run generate-types"
},
"dependencies": {
"@acala-network/chopsticks": "0.12.1",
"@acala-network/chopsticks": "0.12.2",
"@moonbeam-network/api-augment": "0.2902.0",
"@moonwall/types": "workspace:*",
"@moonwall/util": "workspace:*",
"@octokit/rest": "^20.1.0",
"@polkadot/api": "11.2.1",
"@polkadot/api-derive": "11.2.1",
"@octokit/rest": "^21.0.0",
"@polkadot/api": "12.1.1",
"@polkadot/api-derive": "12.1.1",
"@polkadot/keyring": "12.6.2",
"@polkadot/types": "11.2.1",
"@polkadot/types-codec": "11.2.1",
"@polkadot/types": "12.1.1",
"@polkadot/types-codec": "12.1.1",
"@polkadot/util": "12.6.2",
"@polkadot/util-crypto": "12.6.2",
"@vitest/ui": "1.6.0",
"@zombienet/orchestrator": "0.0.86",
"@zombienet/orchestrator": "0.0.87",
"@zombienet/utils": "0.0.25",
"bottleneck": "2.19.5",
"chalk": "5.3.0",
Expand All @@ -80,20 +80,19 @@
"colors": "1.4.0",
"debug": "4.3.5",
"dotenv": "16.4.5",
"ethers": "6.13.0",
"ethers": "6.13.1",
"get-port": "^7.1.0",
"inquirer": "9.2.23",
"inquirer": "9.3.3",
"inquirer-press-to-continue": "1.2.0",
"jsonc-parser": "3.2.1",
"minimatch": "9.0.4",
"node-fetch": "3.3.2",
"jsonc-parser": "3.3.1",
"minimatch": "9.0.5",
"semver": "7.6.2",
"viem": "2.13.7",
"viem": "2.17.0",
"vitest": "1.6.0",
"web3": "4.9.0",
"web3": "4.10.0",
"web3-providers-ws": "^4.0.7",
"ws": "8.17.0",
"yaml": "2.4.3",
"ws": "8.18.0",
"yaml": "2.4.5",
"yargs": "17.7.2"
},
"peerDependencies": {
Expand All @@ -103,18 +102,18 @@
"vitest": "^1.2.2"
},
"devDependencies": {
"@biomejs/biome": "1.8.0",
"@biomejs/biome": "1.8.3",
"@types/clear": "^0.1.4",
"@types/cli-progress": "3.11.5",
"@types/debug": "4.1.12",
"@types/inquirer": "^9.0.7",
"@types/node": "20.14.2",
"@types/node": "20.14.9",
"@types/semver": "^7.5.8",
"@types/ws": "^8.5.10",
"@types/yargs": "17.0.32",
"tsup": "8.1.0",
"tsx": "4.12.0",
"typescript": "5.4.5"
"tsx": "4.16.2",
"typescript": "5.5.3"
},
"publishConfig": {
"access": "public"
Expand Down
8 changes: 7 additions & 1 deletion packages/cli/src/cmds/entrypoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { hideBin } from "yargs/helpers";
import { fetchArtifact, deriveTestIds, generateConfig, type fetchArtifactArgs } from "../internal";
import { main } from "./main";
import { runNetworkCmd } from "./runNetwork";
import { testCmd } from "./runTests";
import { testCmd, testRunArgs } from "./runTests";
import { configSetup } from "../lib/configReader";
dotenv.config();

Expand Down Expand Up @@ -85,6 +85,11 @@ yargs(hideBin(process.argv))
describe: "Additional sub-directory filter for test suites",
alias: "d",
type: "string",
})
.option("testShard", {
describe: "Test Shard info for CI",
alias: "ts",
type: "string",
});
},
async (args) => {
Expand All @@ -94,6 +99,7 @@ yargs(hideBin(process.argv))
!(await testCmd(args.envName.toString(), {
testNamePattern: args.GrepTest,
subDirectory: args.subDirectory,
shard: args.testShard,
}))
) {
process.exitCode = 1;
Expand Down
Loading

0 comments on commit bad99a1

Please sign in to comment.