Skip to content
Draft
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
12 changes: 3 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ jobs:
run: pnpm --filter vite-task-tools exec playwright install-deps chromium

- name: Run ignored tests
run: |
pnpm --filter vite-task-tools test
$TEST_CARGO_CMD test --target $TEST_BUILD_TARGET -- --ignored
run: $TEST_CARGO_CMD test --target $TEST_BUILD_TARGET -- --ignored

# Running x64 binaries under Rosetta makes this the slowest job, so pull
# requests run it only with the `ci: full` label.
Expand Down Expand Up @@ -300,9 +298,7 @@ jobs:

- name: Run ignored tests
if: matrix.mode == 'ignored'
run: |
pnpm --filter vite-task-tools test
cargo-nextest nextest run --archive-file windows-tests.tar.zst --workspace-remap . --run-ignored ignored-only
run: cargo-nextest nextest run --archive-file windows-tests.tar.zst --workspace-remap . --run-ignored ignored-only

# Building without a Rust cache inside the Alpine container makes this one of
# the slowest jobs, so pull requests run it only with the `ci: full` label.
Expand Down Expand Up @@ -360,9 +356,7 @@ jobs:
- uses: oxc-project/setup-node@f46a72f95efdc55273fcd042d61c84e723b2892c # v1.4.1

- name: Run ignored tests
run: |
pnpm --filter vite-task-tools test
cargo test -- --ignored
run: cargo test -- --ignored

fmt:
name: Format and Check Deps
Expand Down
117 changes: 114 additions & 3 deletions crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/snapshots.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
# Cases that use the remote cache backend are ignored because it runs on
# Node.js. Windows is skipped because the PTY launcher cannot execute pnpm
# command shims. Whether an upload to the backend is still running when the
# tasks finish depends on timing, so steps that upload hide the message about
# pending uploads. The cases that test it stall the uploads instead, with
# command shims. Each of these cases starts its own backend first, runs
# commands against it with `remote-cache-server run`, and stops it last.
# Whether an upload to the backend is still running when the tasks finish
# depends on timing, so steps that upload hide the message about pending
# uploads. The cases that test it stall the uploads instead, with
# stalled-remote-cache in front of the backend.
[[e2e]]
name = "read_write"
cfg = "not(windows)"
ignore = true
steps = [
[
"remote-cache-server",
"start",
],
{ argv = [
"remote-cache-server",
"run",
"vt",
"run",
"build",
Expand All @@ -26,6 +33,7 @@ steps = [
], comment = "The fetch finds no entry. The new execution is uploaded with one store request, and vt run waits for it after the task finishes." },
{ argv = [
"remote-cache-server",
"run",
"vt",
"run",
"build",
Expand All @@ -35,15 +43,24 @@ steps = [
"read-write",
],
], comment = "A local hit makes no requests." },
[
"remote-cache-server",
"stop",
],
]

[[e2e]]
name = "read"
cfg = "not(windows)"
ignore = true
steps = [
[
"remote-cache-server",
"start",
],
{ argv = [
"remote-cache-server",
"run",
"vt",
"run",
"build",
Expand All @@ -65,19 +82,29 @@ steps = [
],
{ argv = [
"remote-cache-server",
"run",
"vt",
"run",
"build",
], comment = "An endpoint without a mode selects read. The task reruns without uploading." },
[
"remote-cache-server",
"stop",
],
]

[[e2e]]
name = "restore"
cfg = "not(windows)"
ignore = true
steps = [
[
"remote-cache-server",
"start",
],
{ argv = [
"remote-cache-server",
"run",
"vt",
"run",
"build",
Expand All @@ -104,6 +131,7 @@ steps = [
],
{ argv = [
"remote-cache-server",
"run",
"vt",
"run",
"build",
Expand All @@ -120,6 +148,7 @@ steps = [
], comment = "The outputs are restored." },
{ argv = [
"remote-cache-server",
"run",
"vt",
"run",
"build",
Expand All @@ -137,19 +166,29 @@ steps = [
],
{ argv = [
"remote-cache-server",
"run",
"vt",
"run",
"build",
], comment = "The exact entry fails validation, so the archive isn't downloaded." },
[
"remote-cache-server",
"stop",
],
]

[[e2e]]
name = "local_and_remote_hits"
cfg = "not(windows)"
ignore = true
steps = [
[
"remote-cache-server",
"start",
],
{ argv = [
"remote-cache-server",
"run",
"vt",
"run",
"build",
Expand All @@ -175,6 +214,7 @@ steps = [
], comment = "Without an endpoint, check is cached only locally." },
{ argv = [
"remote-cache-server",
"run",
"vt",
"run",
"all",
Expand All @@ -184,15 +224,24 @@ steps = [
"run",
"--last-details",
], comment = "The details show which hit came from the remote cache." },
[
"remote-cache-server",
"stop",
],
]

[[e2e]]
name = "fallback"
cfg = "not(windows)"
ignore = true
steps = [
[
"remote-cache-server",
"start",
],
{ argv = [
"remote-cache-server",
"run",
"vt",
"run",
"build",
Expand Down Expand Up @@ -220,19 +269,29 @@ steps = [
],
{ argv = [
"remote-cache-server",
"run",
"vt",
"run",
"build",
], comment = "The entry stored for this task has a different key. The miss reason compares it with the current key." },
[
"remote-cache-server",
"stop",
],
]

[[e2e]]
name = "corrupt_archive"
cfg = "not(windows)"
ignore = true
steps = [
[
"remote-cache-server",
"start",
],
{ argv = [
"remote-cache-server",
"run",
"vt",
"run",
"build",
Expand All @@ -259,6 +318,7 @@ steps = [
],
{ argv = [
"remote-cache-server",
"run",
"vt",
"run",
"build",
Expand All @@ -276,15 +336,24 @@ steps = [
".tmp",
"--recursive",
], comment = "The corrupt download was removed." },
[
"remote-cache-server",
"stop",
],
]

[[e2e]]
name = "restore_failure"
cfg = "not(windows)"
ignore = true
steps = [
[
"remote-cache-server",
"start",
],
{ argv = [
"remote-cache-server",
"run",
"vt",
"run",
"build",
Expand Down Expand Up @@ -317,6 +386,7 @@ steps = [
], comment = "A file where the output directory goes makes restoring fail." },
{ argv = [
"remote-cache-server",
"run",
"vt",
"run",
"build",
Expand All @@ -341,19 +411,29 @@ steps = [
],
{ argv = [
"remote-cache-server",
"run",
"vt",
"run",
"build",
], comment = "Nothing was cached locally, so the remote entry is fetched and restored again." },
[
"remote-cache-server",
"stop",
],
]

[[e2e]]
name = "pending_uploads"
cfg = "not(windows)"
ignore = true
steps = [
[
"remote-cache-server",
"start",
],
{ argv = [
"remote-cache-server",
"run",
"vtt",
"stalled-remote-cache",
"--stall",
Expand All @@ -375,6 +455,10 @@ steps = [
"run",
"--last-details",
], comment = "Both uploads were cancelled." },
[
"remote-cache-server",
"stop",
],
]

[[e2e]]
Expand Down Expand Up @@ -565,8 +649,13 @@ name = "ctrl_c_during_upload"
cfg = "not(windows)"
ignore = true
steps = [
[
"remote-cache-server",
"start",
],
{ argv = [
"remote-cache-server",
"run",
"vtt",
"stalled-remote-cache",
"--stall",
Expand All @@ -593,15 +682,24 @@ steps = [
"run",
"build",
], comment = "The entry is still in the local cache." },
[
"remote-cache-server",
"stop",
],
]

[[e2e]]
name = "fast_fail_during_upload"
cfg = "not(windows)"
ignore = true
steps = [
[
"remote-cache-server",
"start",
],
{ argv = [
"remote-cache-server",
"run",
"vtt",
"stalled-remote-cache",
"--stall",
Expand All @@ -618,15 +716,24 @@ steps = [
{ "expect-milestone" = "uploads-pending" },
{ "write-key" = "ctrl-c" },
], comment = "The proxy never forwards the upload. fail-after-build exits after build finishes, which doesn't cancel build's upload, so vt run waits for it until Ctrl-C." },
[
"remote-cache-server",
"stop",
],
]

[[e2e]]
name = "hide_pending_uploads"
cfg = "not(windows)"
ignore = true
steps = [
[
"remote-cache-server",
"start",
],
{ argv = [
"remote-cache-server",
"run",
"vtt",
"stalled-remote-cache",
"--stall",
Expand All @@ -647,4 +754,8 @@ steps = [
{ "expect-milestone" = "uploads-pending" },
{ "write-key" = "ctrl-c" },
], comment = "The proxy never forwards the upload. vt run waits for it until Ctrl-C, without the message about pending uploads." },
[
"remote-cache-server",
"stop",
],
]
Loading
Loading