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

[CSR-675] Feat/ci timeout pass #10

Open
wants to merge 2 commits into
base: fix/cypress-13
Choose a base branch
from
Open
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
7 changes: 2 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@


# [2.0.0-beta.1](https://github.com/currents-dev/cypress-cloud/compare/v2.0.0-beta.0...v2.0.0-beta.1) (2023-09-22)


### Bug Fixes

* debugging fixes ([d502b12](https://github.com/currents-dev/cypress-cloud/commit/d502b121b4a5bb85921fa26b6b04a12274be3b19))
- debugging fixes ([d502b12](https://github.com/currents-dev/cypress-cloud/commit/d502b121b4a5bb85921fa26b6b04a12274be3b19))

# [2.0.0-beta.0](https://github.com/currents-dev/cypress-cloud/compare/v1.10.0-beta.1...v2.0.0-beta.0) (2023-09-19)

Expand Down Expand Up @@ -339,4 +336,4 @@
- implement generic http client with retries ([a9711bd](https://github.com/currents-dev/cypress-cloud/commit/a9711bde1fbb2cd37dbc8979593159d183bfa866))
- improve setup steps ([9bf16fe](https://github.com/currents-dev/cypress-cloud/commit/9bf16fe5f3773db4aa2f169515303ea6d0973da6))
- separate stdout per spec file ([a9d01c3](https://github.com/currents-dev/cypress-cloud/commit/a9d01c349cbfe140a568a452b0e7163e6d27f2db))
- setup github actions ([d439f56](https://github.com/currents-dev/cypress-cloud/commit/d439f5660698177087fcc2e7a61c64ea263816f6))
- setup github actions ([d439f56](https://github.com/currents-dev/cypress-cloud/commit/d439f5660698177087fcc2e7a61c64ea263816f6))
8 changes: 8 additions & 0 deletions packages/cypress-cloud/bin/lib/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@ ${getLegalNotice()}
)
.default(undefined)
.argParser((i) => (i === "false" ? false : true))
)
.addOption(
new Option(
`--ci-timeout-pass [bool]`,
`Enable ci runner to pass/fail but no error even if the run timed out`
)
.default(undefined)
.argParser((i) => (i === "false" ? false : true))
);

export const program = createProgram();
Expand Down
1 change: 1 addition & 0 deletions packages/cypress-cloud/lib/api/types/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export type CreateRunPayload = {
batchSize?: number;
autoCancelAfterFailures: ValidatedCurrentsParameters["autoCancelAfterFailures"];
coverageEnabled?: boolean;
ciTimeoutPass?: boolean;
};

export type CloudWarning = {
Expand Down
2 changes: 1 addition & 1 deletion packages/cypress-cloud/lib/bootstrap/serializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function getCypressCLIParams(
}
: {};
return {
..._.omit(result, "testingType"),
..._.omit(result, "testingType", "ciTimeoutPass"),
...testingType,
};
}
Expand Down
2 changes: 2 additions & 0 deletions packages/cypress-cloud/lib/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export async function run(params: CurrentsRunParameters = {}) {
batchSize,
autoCancelAfterFailures,
experimentalCoverageRecording,
ciTimeoutPass,
} = validatedParams;

const config = await getMergedConfig(validatedParams);
Expand Down Expand Up @@ -109,6 +110,7 @@ export async function run(params: CurrentsRunParameters = {}) {
batchSize,
autoCancelAfterFailures,
coverageEnabled: experimentalCoverageRecording,
ciTimeoutPass,
});

setRunId(run.runId);
Expand Down
5 changes: 5 additions & 0 deletions packages/cypress-cloud/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,11 @@ export type CurrentsRunParameters = StrippedCypressModuleAPIOptions & {
* Whether to record coverage results. If set, must be a boolean, defaults to false.
*/
experimentalCoverageRecording?: boolean;

/**
* Flag to allow a github action to pass/fail but no error, if the run is timed out.
*/
ciTimeoutPass?: boolean;
};

// User-facing `run` interface
Expand Down
Loading