perf(ci): reuse verified pull request candidates
Platform CI tests / QuickStack deploy action tests (pull_request) Successful in 25s
Nuvisphere/Platform-CI: Immutable QuickStack OCI deployment / Build once and deploy exact digest (pull_request) Successful in 28s
Platform CI tests / QuickStack deploy action tests (push) Successful in 21s
Nuvisphere/Platform-CI: Immutable QuickStack OCI deployment / Build once and deploy exact digest (push) Successful in 28s
Platform CI tests / QuickStack deploy action tests (pull_request) Successful in 25s
Nuvisphere/Platform-CI: Immutable QuickStack OCI deployment / Build once and deploy exact digest (pull_request) Successful in 28s
Platform CI tests / QuickStack deploy action tests (push) Successful in 21s
Nuvisphere/Platform-CI: Immutable QuickStack OCI deployment / Build once and deploy exact digest (push) Successful in 28s
This commit was merged in pull request #6.
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
deployExactImage,
|
||||
expandTokens,
|
||||
mergeEnvironment,
|
||||
isValidationOnlyCandidateBuild,
|
||||
normalizeVolumeMountPaths,
|
||||
parseEnvironment,
|
||||
resolveActionMode,
|
||||
@@ -105,6 +106,30 @@ test("production pull requests validate tested candidates without rebuilding", (
|
||||
);
|
||||
});
|
||||
|
||||
test("same-repository pull requests publish reusable candidates while forks stay validation-only", () => {
|
||||
assert.equal(
|
||||
isValidationOnlyCandidateBuild({
|
||||
eventName: "pull_request",
|
||||
sameRepositoryPullRequest: true,
|
||||
}),
|
||||
false,
|
||||
);
|
||||
assert.equal(
|
||||
isValidationOnlyCandidateBuild({
|
||||
eventName: "pull_request",
|
||||
sameRepositoryPullRequest: false,
|
||||
}),
|
||||
true,
|
||||
);
|
||||
assert.equal(
|
||||
isValidationOnlyCandidateBuild({
|
||||
eventName: "push",
|
||||
sameRepositoryPullRequest: false,
|
||||
}),
|
||||
false,
|
||||
);
|
||||
});
|
||||
|
||||
test("validates split action modes and artifact build slots", () => {
|
||||
assert.equal(resolveActionMode(undefined), "all");
|
||||
assert.equal(resolveActionMode("BUILD"), "build");
|
||||
|
||||
Reference in New Issue
Block a user