repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by admin

release: persist CI caches for v0.1.3

226da74e387836dccffb60375e49803a1dcde3dd

Oliver Jan Krylow <oliver@bugabinga.net> ·

SSH signature · not checked

Browse filesCompare with HEAD

Changed files (5)

.ci/ci.kdl

Modified
6 6 tag "v*"
9 - cache "home" {
10 - path ".home"
11 - key {
12 - file "mise.lock"
13 - file "package-lock.json"
14 - }
15 - }
16 - run "export HOME=/work/.home && mkdir -p \"$HOME\""
17 - run "command -v mise >/dev/null 2>&1 || curl -fsSL https://mise.run | sh"
18 - run "export PATH=\"$HOME/.local/bin:$PATH\""
9 + mount "cache" "toolchains" "/cache/toolchains"
10 + mount "cache" "npm" "/cache/npm"
11 + run "export HOME=/tmp/pi-ext-home MISE_DATA_DIR=/cache/toolchains/mise MISE_CACHE_DIR=/cache/toolchains/downloads GOCACHE=/cache/toolchains/go-build GOPATH=/cache/toolchains/go NPM_CONFIG_CACHE=/cache/npm && mkdir -p \"$HOME\" /cache/toolchains/bin"
12 + run "export PATH=\"/cache/toolchains/bin:$HOME/.local/bin:$PATH\""
13 + run "command -v mise >/dev/null 2>&1 || { curl -fsSL https://mise.run | sh && cp \"$HOME/.local/bin/mise\" /cache/toolchains/bin/mise; }"
19 14 run "mise trust"
20 15 run "mise install"
21 16 // Luci's capability-free container replaces Firefox's incompatible content sandbox.

CHANGELOG.md

Modified
2 2 # Changelog
4 4 ## Unreleased
6 +## 0.1.3
8 +- Persist Mise toolchains, downloads, Go build caches, and npm downloads across failed CI runs using durable cache mounts
9 +- Keep ephemeral Mise trust state outside the source checkout and cached toolchain directories
10 +- Remove Node startup latency from RTK timeout test fixtures
6 12 ## 0.1.2
8 14 - Wait for bak's background initialization instead of assuming a fixed startup delay in settings tests

extensions/rtk/__tests__/settings.test.ts

Modified
13 13 const extensionPath = path.resolve(import.meta.dirname, "../index.ts");
15 +// Avoid Node startup latency inside the 100ms version-probe timeout.
15 16 // Rewrites answer after 300ms; the version probe optionally does too.
16 -const FAKE_RTK = `#!/usr/bin/env node
17 -const [, , sub] = process.argv;
18 -const delay = sub === "--version" ? Number(process.env.FAKE_RTK_VERSION_DELAY ?? 0) : 300;
19 -setTimeout(() => {
20 - console.log(sub === "--version" ? "rtk 0.37.2" : "rtk git status");
21 -}, delay);
17 +const FAKE_RTK = `#!/bin/sh
18 +if [ "$1" = "--version" ]; then
19 + if [ -n "$FAKE_RTK_VERSION_DELAY" ]; then sleep "$FAKE_RTK_VERSION_DELAY"; fi
20 + printf '%s\\n' 'rtk 0.37.2'
21 +else
22 + sleep 0.3
23 + printf '%s\\n' 'rtk git status'
24 +fi
24 27 type Case = {
67 70 env: {
68 71 PATH: `${bin}${path.delimiter}${process.env.PATH ?? ""}`,
69 72 PI_RTK_REWRITE_TIMEOUT_MS: input.env,
70 - FAKE_RTK_VERSION_DELAY: input.versionDelay?.toString(),
73 + FAKE_RTK_VERSION_DELAY:
74 + input.versionDelay === undefined
75 + ? undefined
76 + : String(input.versionDelay / 1000),
73 79 if (input.untrusted) t.session.settingsManager.setProjectTrusted(false);

package-lock.json

Modified
2 2 "name": "pi-ext",
3 - "version": "0.1.2",
3 + "version": "0.1.3",
4 4 "lockfileVersion": 3,
5 5 "requires": true,
6 6 "packages": {
7 7 "": {
8 8 "name": "pi-ext",
9 - "version": "0.1.2",
9 + "version": "0.1.3",
10 10 "workspaces": [
11 11 "extensions/*"

package.json

Modified
2 2 "name": "pi-ext",
3 - "version": "0.1.2",
3 + "version": "0.1.3",
4 4 "private": true,
5 5 "type": "module",
6 6 "workspaces": [