mirror of
https://github.com/datahaven-xyz/datahaven
synced 2026-05-24 09:50:01 +00:00
Eventually our CI will be required to run two private blockchains locally plus associated relayers. This PR is to prepare for this fate by improving run times and refactoring our existing CIs so they are a bit easier to reason about. ### Refactors - **_We now run ALL CIs on every PR!_** This is so that we decomplexify the logic around conditional builds and fetching built binaries from another source. This reduces the surface area of code we have to maintain at the cost of execution time - This penalty is ameliorated by a layered caching system. At best, it will be less than a minute to complete a build since everything will be cached. On GH runners this is about 6 minutes sadly. - We will no longer be at risk of important CIs being skipped erroneously which hide true failures. - Caching is a low-risk approach because at worst it has to build from scratch. A bad cache hit will never imply the wrong thing gets build since cargo is smart enough to just throw away any inappropriate build artefacts. - `setup-rust` action created so we have a unified way of setting up runner and unifying our approach to caching - Use a unique caching key for different activities and it will fallback to shared cache if no matches - we are using `mainnet` kurtosis config so that it works with relayer assumptions ### Additions - We can specify the ethereum block time via a new cli arg `--slot-time <seconds>` - We can specify arbitrary network_param args which get passed into the generated yaml - e.g. giving `bun cli --kurtosis-network-args="pet=cat food=fish" will add: ```yml network_params: # existing params... pet: cat food: fish ``` - We now have the ability to programmatically modify the yaml - This means we are back down to a single `minimal.yml` kurtosis config so we dont have to maintain changes between them - Flow is: `add new cli arg` -> `add if() block which mutates yaml` -> `profit` --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Facundo Farall <37149322+ffarall@users.noreply.github.com>
63 lines
2.2 KiB
JSON
63 lines
2.2 KiB
JSON
{
|
|
"name": "@datahaven/e2e-test",
|
|
"module": "index.ts",
|
|
"type": "module",
|
|
"private": true,
|
|
"scripts": {
|
|
"cli": "bun run cli/index.ts",
|
|
"fmt": "biome check .",
|
|
"fmt:fix": "biome check --write .",
|
|
"build:docker:relayer": "bun -e \"import build from './scripts/snowbridge-relayer.ts'; build()\"",
|
|
"generate:wagmi": "wagmi generate",
|
|
"generate:snowbridge-cfgs": "bun -e \"import {generateSnowbridgeConfigs} from './scripts/gen-snowbridge-cfgs.ts'; await generateSnowbridgeConfigs()\"",
|
|
"start:e2e:verified": "bun cli --verified --blockscout --deploy-contracts --setup-validators --update-validator-set --fund-validators --slot-time 1",
|
|
"start:e2e:ci": "bun cli -d --setup-validators --update-validator-set --fund-validators --always-clean --slot-time 2",
|
|
"start:e2e:minrelayer": "bun cli --relayer -d --no-setup-validators --no-update-validator-set --no-fund-validators --datahaven",
|
|
"stop:e2e": "pkill datahaven ; kurtosis enclave stop datahaven-ethereum && kurtosis clean && kurtosis engine stop && docker container prune -f",
|
|
"stop:e2e:verified": "bun stop:e2e",
|
|
"stop:e2e:minimal": "bun stop:e2e",
|
|
"stop:e2e:quick": "kurtosis enclave stop datahaven-ethereum",
|
|
"stop:kurtosis-engine": "kurtosis engine stop && docker container prune -f",
|
|
"test:e2e": "bun test suites/e2e --timeout 30000",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bun": "latest"
|
|
},
|
|
"peerDependencies": {
|
|
"typescript": "^5.8.3"
|
|
},
|
|
"dependencies": {
|
|
"@biomejs/biome": "^1.9.4",
|
|
"@commander-js/extra-typings": "^13.1.0",
|
|
"@dotenvx/dotenvx": "^1.41.0",
|
|
"@inquirer/prompts": "^7.5.0",
|
|
"@types/dockerode": "^3.3.38",
|
|
"@types/node": "^22.14.1",
|
|
"@wagmi/cli": "^2.3.0",
|
|
"@wagmi/core": "^2.17.0",
|
|
"chalk": "^5.4.1",
|
|
"commander": "^13.1.0",
|
|
"dockerode": "^4.0.6",
|
|
"dotenv": "^16.5.0",
|
|
"octokit": "^4.1.3",
|
|
"ora": "^8.2.0",
|
|
"pino": "^9.6.0",
|
|
"pino-pretty": "^13.0.0",
|
|
"tiny-invariant": "^1.3.3",
|
|
"viem": "^2.28.0",
|
|
"wagmi": "^2.15.0",
|
|
"yaml": "^2.7.1",
|
|
"zod": "^3.24.3"
|
|
},
|
|
"trustedDependencies": [
|
|
"@biomejs/biome",
|
|
"bufferutil",
|
|
"cpu-features",
|
|
"esbuild",
|
|
"keccak",
|
|
"protobufjs",
|
|
"ssh2",
|
|
"utf-8-validate"
|
|
]
|
|
}
|