Skip to content

ci: add Cloudflare CI pipeline - #212

Draft
fengmk2 wants to merge 4 commits into
mainfrom
ci/cloudflare-ci-pipeline
Draft

fengmk2 wants to merge 4 commits into
mainfrom
ci/cloudflare-ci-pipeline

ci: link each check in the Cloudflare CI comment to its check page

18b879f
Select commit
Loading
Failed to load commit list.
Cloudflare Workers and Pages / cloudflare-ci/unit-tests failed Nov 17, 2026 in 34s

Failed (exit 1)

The last 16 KiB of the runner log:



stdout | src/gitlab/index.test.ts > GitLab setup parity > uses persistent sfw storage only when GitLab caching is enabled (true)
vp v0.3.1

stdout | src/gitlab/index.test.ts > GitLab setup parity > uses persistent sfw storage only when GitLab caching is enabled (false)
setup-vp: installing sfw v1.15.4 from https://github.com/SocketDev/sfw-free/releases/download/v1.15.4/sfw-free-linux-x86_64

stdout | src/gitlab/index.test.ts > GitLab setup parity > uses persistent sfw storage only when GitLab caching is enabled (false)
setup-vp: running /tmp/setup-vp-sfw-LteRPR/sfw vp install (cwd: /tmp/setup-vp-gitlab-lifecycle-qJRzKU/app)

stdout | src/gitlab/index.test.ts > GitLab setup parity > uses persistent sfw storage only when GitLab caching is enabled (false)
vp v0.3.1

stdout | src/gitlab/index.test.ts > GitLab setup parity > uses persistent sfw storage only when GitLab caching is enabled ()
setup-vp: installing sfw v1.15.4 from https://github.com/SocketDev/sfw-free/releases/download/v1.15.4/sfw-free-linux-x86_64

stdout | src/gitlab/index.test.ts > GitLab setup parity > uses persistent sfw storage only when GitLab caching is enabled ()
setup-vp: running /tmp/setup-vp-sfw-qkxepi/sfw vp install (cwd: /tmp/setup-vp-gitlab-lifecycle-wdurBh/app)

stdout | src/gitlab/index.test.ts > GitLab setup parity > uses persistent sfw storage only when GitLab caching is enabled ()
vp v0.3.1

 ✓ src/gitlab/index.test.ts (39 tests) 133ms
 ✓ src/ci/cache-snapshot.test.ts (16 tests | 1 skipped) 57ms
 ✓ src/utils.test.ts (37 tests) 15ms
 ✓ src/reuse-viteplus.test.ts (98 tests) 314ms
 ✓ src/azure/parity.test.ts (18 tests) 55ms
 ✓ src/auth.test.ts (31 tests) 15ms
 ✓ src/lockfile-version.test.ts (26 tests) 23ms
 ✓ src/install-sfw.test.ts (35 tests) 31ms
 ✓ src/rebuild-bundle-workflow.test.ts (29 tests) 64ms
 ✓ src/index.test.ts (17 tests) 26ms
stdout | src/install-sfw-path.test.ts > portable sfw execution > executes the selected existing binary despite workspace binaries and PATH changes
setup-vp: using existing sfw on PATH: /tmp/setup-vp-sfw-execute-bPms4f/trusted bin/sfw

stdout | src/install-sfw-path.test.ts > portable sfw execution > executes the selected existing binary despite workspace binaries and PATH changes
setup-vp: running /tmp/setup-vp-sfw-execute-bPms4f/trusted bin/sfw vp install --frozen-lockfile  two words (cwd: /tmp/setup-vp-sfw-execute-bPms4f/workspace/install directory)

stdout | src/install-sfw-path.test.ts > portable sfw execution > executes the selected existing binary despite workspace binaries and PATH changes
setup-vp: running /tmp/setup-vp-sfw-execute-bPms4f/trusted bin/sfw vp install --frozen-lockfile  two words (cwd: /tmp/setup-vp-sfw-execute-bPms4f/workspace/install directory)

stdout | src/install-sfw-path.test.ts > portable sfw execution > executes the selected download binary despite workspace binaries and PATH changes
setup-vp: installing sfw v1.15.4 from https://github.com/SocketDev/sfw-free/releases/download/v1.15.4/sfw-free-linux-x86_64

stdout | src/install-sfw-path.test.ts > portable sfw execution > executes the selected download binary despite workspace binaries and PATH changes
setup-vp: running /tmp/setup-vp-sfw-execute-B3HUcZ/portable cache/v1.15.4/sfw-free-linux-x86_64/sfw vp install --frozen-lockfile  two words (cwd: /tmp/setup-vp-sfw-execute-B3HUcZ/workspace/install directory)

stdout | src/install-sfw-path.test.ts > portable sfw execution > executes the selected download binary despite workspace binaries and PATH changes
setup-vp: running /tmp/setup-vp-sfw-execute-B3HUcZ/portable cache/v1.15.4/sfw-free-linux-x86_64/sfw vp install --frozen-lockfile  two words (cwd: /tmp/setup-vp-sfw-execute-B3HUcZ/workspace/install directory)

stdout | src/install-sfw-path.test.ts > portable sfw execution > executes the selected cache binary despite workspace binaries and PATH changes
setup-vp: installing sfw v1.15.4 from https://github.com/SocketDev/sfw-free/releases/download/v1.15.4/sfw-free-linux-x86_64

stdout | src/install-sfw-path.test.ts > portable sfw execution > executes the selected cache binary despite workspace binaries and PATH changes
setup-vp: using cached sfw v1.15.4: /tmp/setup-vp-sfw-execute-YYwjNR/portable cache/v1.15.4/sfw-free-linux-x86_64/sfw

stdout | src/install-sfw-path.test.ts > portable sfw execution > executes the selected cache binary despite workspace binaries and PATH changes
setup-vp: running /tmp/setup-vp-sfw-execute-YYwjNR/portable cache/v1.15.4/sfw-free-linux-x86_64/sfw vp install --frozen-lockfile  two words (cwd: /tmp/setup-vp-sfw-execute-YYwjNR/workspace/install directory)

stdout | src/install-sfw-path.test.ts > portable sfw execution > executes the selected cache binary despite workspace binaries and PATH changes
setup-vp: running /tmp/setup-vp-sfw-execute-YYwjNR/portable cache/v1.15.4/sfw-free-linux-x86_64/sfw vp install --frozen-lockfile  two words (cwd: /tmp/setup-vp-sfw-execute-YYwjNR/workspace/install directory)

Using existing sfw on PATH: /tmp/setup-vp-sfw-execute-vE1oNj/trusted bin/sfw
::group::Running /tmp/setup-vp-sfw-execute-vE1oNj/trusted bin/sfw vp install --frozen-lockfile  two words in /tmp/setup-vp-sfw-execute-vE1oNj/workspace/install directory...
[command]/tmp/setup-vp-sfw-execute-vE1oNj/trusted bin/sfw vp install --frozen-lockfile  two words
::endgroup::
Successfully ran /tmp/setup-vp-sfw-execute-vE1oNj/trusted bin/sfw vp install --frozen-lockfile  two words
::group::Running /tmp/setup-vp-sfw-execute-vE1oNj/trusted bin/sfw vp install --frozen-lockfile  two words in /tmp/setup-vp-sfw-execute-vE1oNj/workspace/install directory...
[command]/tmp/setup-vp-sfw-execute-vE1oNj/trusted bin/sfw vp install --frozen-lockfile  two words
::endgroup::
Successfully ran /tmp/setup-vp-sfw-execute-vE1oNj/trusted bin/sfw vp install --frozen-lockfile  two words
Installing sfw from https://github.com/SocketDev/sfw-free/releases/download/v1.15.4/sfw-free-linux-x86_64...
sfw installed at /tmp/setup-vp-sfw-execute-AHuP5r/sfw-bin/sfw
sfw cached under key: sfw-v1.15.4-linux-x64-glibc
::group::Running /tmp/setup-vp-sfw-execute-AHuP5r/sfw-bin/sfw vp install --frozen-lockfile  two words in /tmp/setup-vp-sfw-execute-AHuP5r/workspace/install directory...
[command]/tmp/setup-vp-sfw-execute-AHuP5r/sfw-bin/sfw vp install --frozen-lockfile  two words
::endgroup::
Successfully ran /tmp/setup-vp-sfw-execute-AHuP5r/sfw-bin/sfw vp install --frozen-lockfile  two words
::group::Running /tmp/setup-vp-sfw-execute-AHuP5r/sfw-bin/sfw vp install --frozen-lockfile  two words in /tmp/setup-vp-sfw-execute-AHuP5r/workspace/install directory...
[command]/tmp/setup-vp-sfw-execute-AHuP5r/sfw-bin/sfw vp install --frozen-lockfile  two words
::endgroup::
Successfully ran /tmp/setup-vp-sfw-execute-AHuP5r/sfw-bin/sfw vp install --frozen-lockfile  two words
sfw restored from cache: cached
::group::Running /tmp/setup-vp-sfw-execute-l9ZwVB/sfw-bin/sfw vp install --frozen-lockfile  two words in /tmp/setup-vp-sfw-execute-l9ZwVB/workspace/install directory...
[command]/tmp/setup-vp-sfw-execute-l9ZwVB/sfw-bin/sfw vp install --frozen-lockfile  two words
::endgroup::
Successfully ran /tmp/setup-vp-sfw-execute-l9ZwVB/sfw-bin/sfw vp install --frozen-lockfile  two words
::group::Running /tmp/setup-vp-sfw-execute-l9ZwVB/sfw-bin/sfw vp install --frozen-lockfile  two words in /tmp/setup-vp-sfw-execute-l9ZwVB/workspace/install directory...
[command]/tmp/setup-vp-sfw-execute-l9ZwVB/sfw-bin/sfw vp install --frozen-lockfile  two words
::endgroup::
Successfully ran /tmp/setup-vp-sfw-execute-l9ZwVB/sfw-bin/sfw vp install --frozen-lockfile  two words
stdout | src/install-sfw-path.test.ts > does not execute planted lookup tools or reuse sfw from the working directory
setup-vp: using existing sfw on PATH: /tmp/setup-vp-sfw-path-mzjshM/trusted bin/sfw

 ✓ src/install-sfw-path.test.ts (8 tests | 1 skipped) 142ms
 ✓ src/gitlab/workflow.test.ts (53 tests) 394ms
 ✓ src/gitlab/template.test.ts (52 tests | 15 skipped) 1436ms
 ✓ src/ci/toolchain-cache.test.ts (38 tests) 150ms
 ✓ src/azure/template.test.ts (43 tests | 18 skipped) 84ms
 ✓ src/ci/vp-dirs.test.ts (17 tests) 135ms
 ✓ src/inputs.test.ts (33 tests) 26ms
 ✓ src/node-version-file.test.ts (29 tests) 15ms
 ✓ src/ci/process.test.ts (7 tests | 3 skipped) 151ms
 ✓ src/toolchain-cache.test.ts (16 tests) 13ms
 ✓ src/bundle-publish-request.test.ts (28 tests) 35ms
 ✓ src/ci/package-manager-cache.test.ts (30 tests | 1 skipped) 94ms
 ✓ src/azure/index.test.ts (7 tests) 16ms
 ✓ src/setup-ref.test.ts (254 tests | 108 skipped) 1620ms
 ✓ src/azure/install-viteplus.test.ts (8 tests) 16ms
 ✓ src/run-install.test.ts (10 tests) 9ms
 ✓ src/package-manager-cache.test.ts (10 tests) 48ms
stdout | src/gitlab/install-sfw.test.ts > GitLab sfw setup > does not set up sfw when disabled or run-install is disabled
setup-vp: sfw was requested but run-install is disabled; sfw will not be invoked.

stdout | src/gitlab/install-sfw.test.ts > GitLab sfw setup > uses an existing sfw command from PATH
setup-vp: using existing sfw on PATH: /tmp/setup-vp-test-69fwWn/sfw

 ✓ src/gitlab/install-sfw.test.ts (6 tests) 48ms
 ✓ src/ci/install-viteplus.test.ts (9 tests) 19ms
stdout | src/gitlab/run-install.test.ts > GitLab run-install execution > runs install entries with cwd and args
setup-vp: running vp install --frozen-lockfile (cwd: /tmp/setup-vp-test-7PEOuI/app)

stdout | src/gitlab/run-install.test.ts > GitLab run-install execution > runs install entries through sfw when requested
setup-vp: running /trusted/sfw vp install (cwd: /tmp/setup-vp-test-64RyAK)

stdout | src/gitlab/run-install.test.ts > GitLab run-install execution > does not expose SETUP_VP_ENV_FILE to install subprocesses
setup-vp: running vp install (cwd: /tmp/setup-vp-test-nIoIb9)

 ✓ src/gitlab/run-install.test.ts (10 tests) 123ms
 ✓ src/ci/project-node-version.test.ts (29 tests) 28ms
 ✓ src/ci/auth.test.ts (7 tests) 13ms
 ✓ src/bootstrap-toolchain.test.ts (5 tests) 32ms
 ✓ src/gitlab/auth.test.ts (5 tests) 9ms
 ✓ src/portable-bundles.test.ts (5 tests) 250ms
 ✓ src/ci/env-current.test.ts (15 tests) 11ms
stdout | src/ci/install-sfw.test.ts > portable sfw preview handling > keeps sfw enabled for 0.3.2
setup-vp: using existing sfw on PATH: /bin/sfw

stdout | src/ci/install-sfw.test.ts > portable sfw preview handling > keeps sfw enabled for 0.3.3-alpha.1
setup-vp: using existing sfw on PATH: /bin/sfw

stdout | src/ci/install-sfw.test.ts > portable sfw preview handling > keeps sfw enabled for latest
setup-vp: using existing sfw on PATH: /bin/sfw

stdout | src/ci/install-sfw.test.ts > portable sfw preview handling > keeps sfw enabled for next
setup-vp: using existing sfw on PATH: /bin/sfw

stdout | src/ci/install-sfw.test.ts > portable sfw cache > reuses a complete versioned asset without a second download
setup-vp: installing sfw v1.15.4 from https://github.com/SocketDev/sfw-free/releases/download/v1.15.4/sfw-free-linux-x86_64

stdout | src/ci/install-sfw.test.ts > portable sfw cache > reuses a complete versioned asset without a second download
setup-vp: using cached sfw v1.15.4: /tmp/setup-vp-sfw-cache-txbniN/v1.15.4/sfw-free-linux-x86_64/sfw

stdout | src/ci/install-sfw.test.ts > portable sfw cache > reuses a complete versioned asset without a second download
setup-vp: installing sfw v1.15.4 from https://github.com/SocketDev/sfw-free/releases/download/v1.15.4/sfw-free-musl-linux-x86_64

 ✓ src/ci/install-sfw.test.ts (9 tests) 43ms
 ✓ src/gitlab/bootstrap.test.ts (4 tests) 105ms
stdout | src/ci/run-install.test.ts > portable installs > warms PowerShell and retries the sfw command-lookup failure once
setup-vp: running /trusted/sfw vp install (cwd: /project)

stderr | src/ci/run-install.test.ts > portable installs > warms PowerShell and retries the sfw command-lookup failure once
setup-vp: sfw could not resolve vp; warming the PowerShell command cache and retrying once.

stdout | src/ci/run-install.test.ts > portable installs > runs later entries, aggregates failures, and never retries ordinary install errors
setup-vp: running /trusted/sfw vp install (cwd: /project/a)

stdout | src/ci/run-install.test.ts > portable installs > runs later entries, aggregates failures, and never retries ordinary install errors
setup-vp: running /trusted/sfw vp install (cwd: /project/b)

stdout | src/ci/run-install.test.ts > portable installs > does not claim PowerShell warm-up on linux
setup-vp: running /trusted/sfw vp install (cwd: /project)

stdout | src/ci/run-install.test.ts > portable installs > does not claim PowerShell warm-up on darwin
setup-vp: running /trusted/sfw vp install (cwd: /project)

 ✓ src/ci/run-install.test.ts (5 tests) 19ms
 ✓ src/ci/toolchain-links.test.ts (6 tests) 13ms
 ✓ src/cache-save.test.ts (3 tests) 5ms
stdout | src/ci/process-windows.test.ts > Windows command paths > retains the qualified path C:\trusted when installation uses another drive
setup-vp: running C:\trusted\sfw.exe vp install (cwd: D:\project)

stdout | src/ci/process-windows.test.ts > Windows command paths > retains the qualified path C:/trusted when installation uses another drive
setup-vp: running C:\trusted\sfw.exe vp install (cwd: D:\project)

stdout | src/ci/process-windows.test.ts > Windows command paths > retains the qualified path "C:\trusted bin" when installation uses another drive
setup-vp: running C:\trusted bin\sfw.exe vp install (cwd: D:\project)

stdout | src/ci/process-windows.test.ts > Windows command paths > retains the qualified path \\server\share\trusted when installation uses another drive
setup-vp: running \\server\share\trusted\sfw.exe vp install (cwd: D:\project)

stdout | src/ci/process-windows.test.ts > Windows command paths > retains the qualified path //server/share/trusted when installation uses another drive
setup-vp: running \\server\share\trusted\sfw.exe vp install (cwd: D:\project)

stdout | src/ci/process-windows.test.ts > Windows command paths > retains the qualified path \\?\C:\trusted when installation uses another drive
setup-vp: running \\?\C:\trusted\sfw.exe vp install (cwd: D:\project)

stdout | src/ci/process-windows.test.ts > Windows command paths > retains the qualified path \\?\UNC\server\share\trusted when installation uses another drive
setup-vp: running \\?\UNC\server\share\trusted\sfw.exe vp install (cwd: D:\project)

 ✓ src/ci/process-windows.test.ts (13 tests) 15ms
 ✓ src/azure/inputs.test.ts (3 tests) 10ms
 ✓ src/ci/install-script-urls.test.ts (13 tests) 9ms
 ✓ src/gitlab/shell.test.ts (6 tests) 8ms
 ✓ src/types.test.ts (12 tests) 10ms
 ✓ src/ci/installer-node.test.ts (7 tests) 9ms
 ✓ src/azure/commands.test.ts (2 tests) 4ms
 ✓ src/gitlab/utils.test.ts (3 tests) 6ms
 ✓ src/bundle.test.ts (3 tests) 4ms
 ✓ src/ci/npmrc.test.ts (5 tests) 6ms
 ✓ src/release-version.test.ts (4 tests) 4ms
 ✓ src/ci/node-manager.test.ts (14 tests) 7ms
 ✓ src/gitlab/types.test.ts (1 test) 5ms
 ✓ src/ci/version.test.ts (1 test) 4ms
 ✓ src/ci/platform.test.ts (7 tests) 4ms
 ❯ src/cloudflare-ci-failure.test.ts (1 test | 1 failed) 9ms
   × fails on purpose to show a failed Cloudflare CI check 8ms

⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯

 FAIL  src/cloudflare-ci-failure.test.ts > fails on purpose to show a failed Cloudflare CI check
AssertionError: expected { answer: 2 } to deeply equal { answer: 3 }

- Expected
+ Received

  {
-   "answer": 3,
+   "answer": 2,
  }

 ❯ src/cloudflare-ci-failure.test.ts:5:29
      3| // Fails on purpose to show a failed Cloudflare CI check. Do not merge.
      4| it("fails on purpose to show a failed Cloudflare CI check", () => {
      5|   expect({ answer: 1 + 1 }).toEqual({ answer: 3 });
       |                             ^
      6| });
      7|

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯


 Test Files  1 failed | 58 passed (59)
      Tests  1 failed | 1156 passed | 147 skipped (1304)
   Start at  07:12:52
   Duration  17.49s (tests 59%, import 28%, transform 10%, worker 3%)

     Import  122 modules were evaluated 175 times · 2.91s total, 28% of tracked time
             ~882ms faster with isolate: false — shared modules are evaluated once per worker instead of once per file
             learn more: https://vitest.dev/guide/improving-performance#test-isolation

[ELIFECYCLE] Test failed. See above for more details.