mirror of
https://github.com/morluto/rea.git
synced 2026-12-02 11:33:10 +00:00
perf(ci): skip unused test runtime uploads (#14903)
This commit is contained in:
1 parent
bbed314998
commit
e7c203a5d9
2 files changed
+23
-1
No files matched your search
@@ -568,7 +568,9 @@ jobs:
|
||||
github-token: ${{ github.token }}
|
||||
path: .cache/ci-test-history
|
||||
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
if: needs.changes.outputs.tier != 'warm'
|
||||
if: >-
|
||||
(needs.changes.outputs.code == 'true' && needs.changes.outputs.tier != 'warm') ||
|
||||
needs.changes.outputs.sqlite == 'true'
|
||||
with:
|
||||
name: rea-test-runtime
|
||||
overwrite: true
|
||||
|
||||
@@ -103,6 +103,26 @@ it("fetches historical durations when portable tests can use them", async () =>
|
||||
}
|
||||
});
|
||||
|
||||
it("uploads the test runtime when portable tests or SQLite need it", async () => {
|
||||
const steps = (await workflow()).build!.steps!;
|
||||
const condition = z
|
||||
.string()
|
||||
.parse(steps.find((step) => step.with?.name === "rea-test-runtime")?.if);
|
||||
for (const [tier, code, sqlite, expected] of [
|
||||
["fast", "false", "false", false],
|
||||
["fast", "true", "false", true],
|
||||
["fast", "false", "true", true],
|
||||
["warm", "true", "false", false],
|
||||
["full", "true", "true", true],
|
||||
] as const) {
|
||||
expect(
|
||||
evaluateCondition(condition, {
|
||||
needs: { changes: { outputs: { tier, code, sqlite } } },
|
||||
}),
|
||||
).toBe(expected);
|
||||
}
|
||||
});
|
||||
|
||||
it("looks up a baseline only when main selection can use it", async () => {
|
||||
const steps = (await workflow()).changes!.steps!;
|
||||
const qualification = steps.findIndex((step) => step.id === "qualification");
|
||||
|
||||
Reference in new issue
Block a user