Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: enable mixed beacon-validator sim tests #5940

Merged
merged 4 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/test-sim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,9 @@ jobs:
run: yarn test:sim:backup_eth_provider
working-directory: packages/cli

# Enable these tests after fixing the following issue
# https://github.com/ChainSafe/lodestar/issues/5553
# - name: Sim tests multi client
# run: DEBUG='${{github.event.inputs.debug}}' yarn test:sim:multiclient
# working-directory: packages/cli
- name: Sim tests mixed client
run: DEBUG='${{github.event.inputs.debug}}' yarn test:sim:mixedclient
working-directory: packages/cli

- name: Upload debug log test files for "packages/cli"
if: ${{ always() }}
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"test:unit": "nyc --cache-dir .nyc_output/.cache -e .ts mocha 'test/unit/**/*.test.ts'",
"test:e2e": "mocha --timeout 30000 'test/e2e/**/*.test.ts'",
"test:sim:multifork": "LODESTAR_PRESET=minimal node --loader ts-node/esm test/sim/multi_fork.test.ts",
"test:sim:multiclient": "LODESTAR_PRESET=minimal node --loader ts-node/esm test/sim/multi_client.test.ts",
"test:sim:mixedclient": "LODESTAR_PRESET=minimal node --loader ts-node/esm test/sim/mixed_client.test.ts",
"test:sim:endpoints": "LODESTAR_PRESET=minimal node --loader ts-node/esm test/sim/endpoints.test.ts",
"test:sim:deneb": "LODESTAR_PRESET=minimal node --loader ts-node/esm test/sim/deneb.test.ts",
"test:sim:backup_eth_provider": "LODESTAR_PRESET=minimal node --loader ts-node/esm test/sim/backup_eth_provider.test.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ const ttd = getEstimatedTTD({

const env = await SimulationEnvironment.initWithDefaults(
{
id: "multi-clients",
logsDir: path.join(logFilesDir, "multi-clients"),
id: "mixed-clients",
logsDir: path.join(logFilesDir, "mixed-clients"),
chainConfig: {
ALTAIR_FORK_EPOCH: altairForkEpoch,
BELLATRIX_FORK_EPOCH: bellatrixForkEpoch,
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/test/utils/simulation/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ export type SimulationOptions = {
};

export enum BeaconClient {
Lodestar = "beacon_loadstar",
Lodestar = "beacon_lodestar",
Lighthouse = "beacon_lighthouse",
}

export enum ValidatorClient {
Lodestar = "validator_loadstar",
Lodestar = "validator_lodestar",
Lighthouse = "validator_lighthouse",
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class DockerRunner implements RunnerEnv<RunnerType.Docker> {
}

create(jobOption: Omit<JobOptions<RunnerType.Docker>, "children">): Job {
const jobArgs = ["run", "--rm", "--name", jobOption.id];
const jobArgs = ["run", "--rm", "--name", jobOption.id, "--add-host", "host.docker.internal:host-gateway"];

if (jobOption.options.dockerNetworkIp) {
jobArgs.push("--network", dockerNetworkName);
Expand Down
Loading