Skip to content

Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.

ci: upgrade actions to Node 24 and stabilize fsync test timeouts

Dongdong Chenad19bcd2dee2
diff --git a/.github/actions/check/action.yml b/.github/actions/check/action.yml
index e1b96eb5..f69b9fbe 100644
--- a/.github/actions/check/action.yml
+++ b/.github/actions/check/action.yml
@@ -57,7 +57,7 @@ runs:
node: ${{ steps.plan.outputs.node }}
install: ${{ steps.plan.outputs.install }}
go: ${{ steps.plan.outputs.is_go }}
- - uses: actions/cache/restore@v4
+ - uses: actions/cache/restore@v6
if: steps.plan.outputs.is_go == 'true'
with:
path: |
@@ -80,14 +80,14 @@ runs:
# Pinned golangci-lint and sqlc binaries; building them takes about 60 s
# each. Their file names carry the tool and Go versions, and the key
# hashes the files that pin both, so a version bump misses and rebuilds.
- - uses: actions/cache@v4
+ - uses: actions/cache@v6
if: inputs.app == 'teamhub'
with:
path: apps/teamhub/.tools/bin
key: teamhub-tools-${{ runner.os }}-${{ hashFiles('apps/teamhub/Makefile', 'apps/teamhub/go.mod') }}
# A cold golangci-lint analysis cache costs about 115 s. Pull requests
# restore main's latest entry; only pushes save, so they never write one.
- - uses: actions/cache/restore@v4
+ - uses: actions/cache/restore@v6
if: inputs.app == 'teamhub'
with:
path: ~/.cache/golangci-lint
@@ -106,12 +106,12 @@ runs:
if [ -d ~/.cache/go-build ]; then
find ~/.cache/go-build -type f -mmin +60 -delete
fi
- - uses: actions/cache/save@v4
+ - uses: actions/cache/save@v6
if: always() && github.event_name == 'push' && inputs.app == 'teamhub'
with:
path: ~/.cache/golangci-lint
key: golangci-lint-${{ runner.os }}-${{ hashFiles('apps/teamhub/go.sum', '.golangci.yml') }}-${{ github.sha }}
- - uses: actions/cache/save@v4
+ - uses: actions/cache/save@v6
if: always() && github.event_name == 'push' && steps.plan.outputs.is_go == 'true'
with:
path: |
diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml
index 2568d6a8..cf8f1726 100644
--- a/.github/actions/setup/action.yml
+++ b/.github/actions/setup/action.yml
@@ -41,16 +41,18 @@ runs:
shell: bash
run: |
echo "node=$(tr -d '[:space:]' <.node-version)" >>"$GITHUB_OUTPUT"
- # setup-go@v5 installs the go.mod `go` directive (a full x.y.z here) and
- # ignores `toolchain`. Change this together with any setup-go bump, or
- # the restored directory stops matching the one setup-go looks for.
- echo "go=$(sed -n 's/^go //p' apps/teamhub/go.mod)" >>"$GITHUB_OUTPUT"
- - uses: actions/cache@v4
+ # setup-go@v7 installs the go.mod `toolchain` directive first (falling
+ # back to `go` when absent) and sets GOTOOLCHAIN=local. Match that here
+ # so the restored toolcache directory matches what setup-go looks for.
+ go_ver=$(sed -n 's/^toolchain go//p' apps/teamhub/go.mod | head -n 1)
+ [ -n "$go_ver" ] || go_ver=$(sed -n 's/^go //p' apps/teamhub/go.mod | head -n 1)
+ echo "go=$go_ver" >>"$GITHUB_OUTPUT"
+ - uses: actions/cache@v6
if: inputs.node == 'true'
with:
path: ${{ runner.tool_cache }}/node/${{ steps.versions.outputs.node }}
key: toolcache-node-${{ runner.os }}-${{ runner.arch }}-${{ steps.versions.outputs.node }}
- - uses: actions/cache@v4
+ - uses: actions/cache@v6
if: inputs.go == 'true'
with:
path: ${{ runner.tool_cache }}/go/${{ steps.versions.outputs.go }}
@@ -61,7 +63,7 @@ runs:
# `packages` globs and must stay identical in the save step below, since
# the cache version hashes them.
- id: node-modules
- uses: actions/cache/restore@v4
+ uses: actions/cache/restore@v6
if: inputs.install == 'true'
with:
path: |
@@ -71,9 +73,9 @@ runs:
contracts/generated/typescript/node_modules
key: node-modules-${{ runner.os }}-${{ runner.arch }}-${{ steps.versions.outputs.node }}-${{ hashFiles('pnpm-lock.yaml', 'pnpm-workspace.yaml', '.npmrc', 'patches/**', 'package.json', 'apps/*/package.json', 'packages/*/package.json', 'contracts/generated/typescript/package.json') }}
# Reads the version from packageManager in package.json.
- - uses: pnpm/action-setup@v4
+ - uses: pnpm/action-setup@v6
if: inputs.install == 'true'
- - uses: actions/setup-node@v4
+ - uses: actions/setup-node@v7
if: inputs.node == 'true'
with:
node-version-file: .node-version
@@ -82,7 +84,7 @@ runs:
# The caller caches Go per job: setup-go's one shared entry is saved by
# whichever job finishes first, often one that compiled no Go, and its key
# never changes while go.sum stays the same.
- - uses: actions/setup-go@v5
+ - uses: actions/setup-go@v7
if: inputs.go == 'true'
with:
go-version-file: apps/teamhub/go.mod
@@ -94,7 +96,7 @@ runs:
run: pnpm install --frozen-lockfile --ignore-scripts
# Saved before any check runs, so tool caches such as node_modules/.vite
# never enter the entry.
- - uses: actions/cache/save@v4
+ - uses: actions/cache/save@v6
if: inputs.install == 'true' && inputs.save-node-modules == 'true' && steps.node-modules.outputs.cache-hit != 'true'
with:
path: |
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9bb913be..82306598 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -44,7 +44,7 @@ jobs:
teamhub: ${{ steps.filter.outputs.teamhub }}
computer-go: ${{ steps.filter.outputs.computer-go }}
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v7
with:
fetch-depth: 0
- id: filter
@@ -66,7 +66,7 @@ jobs:
repository-gate:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: ./.github/actions/setup
@@ -82,7 +82,7 @@ jobs:
if: needs.changes.outputs.web == 'true'
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: ./.github/actions/setup
@@ -100,7 +100,7 @@ jobs:
matrix:
shard: [1, 2]
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v7
- uses: ./.github/actions/setup
with:
go: false
@@ -147,7 +147,7 @@ jobs:
if: ${{ !cancelled() && (needs.changes.result != 'success' || needs.changes.outputs.packages == 'true') }}
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v7
- uses: ./.github/actions/check
with:
app: packages
@@ -159,7 +159,7 @@ jobs:
if: ${{ !cancelled() && (needs.changes.result != 'success' || needs.changes.outputs['teamhub-cli'] == 'true') }}
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v7
- uses: ./.github/actions/check
with:
app: teamhub-cli
@@ -171,7 +171,7 @@ jobs:
if: ${{ !cancelled() && (needs.changes.result != 'success' || needs.changes.outputs.installer == 'true') }}
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v7
- uses: ./.github/actions/check
with:
app: installer
@@ -183,7 +183,7 @@ jobs:
if: ${{ !cancelled() && (needs.changes.result != 'success' || needs.changes.outputs.desktop == 'true') }}
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v7
- uses: ./.github/actions/check
with:
app: desktop
@@ -195,7 +195,7 @@ jobs:
if: ${{ !cancelled() && (needs.changes.result != 'success' || needs.changes.outputs.contracts == 'true') }}
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v7
- uses: ./.github/actions/check
with:
app: contracts
@@ -207,7 +207,7 @@ jobs:
if: ${{ !cancelled() && (needs.changes.result != 'success' || needs.changes.outputs.teamhub == 'true') }}
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: ./.github/actions/check
@@ -221,7 +221,7 @@ jobs:
if: ${{ !cancelled() && (needs.changes.result != 'success' || needs.changes.outputs['computer-go'] == 'true') }}
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v7
- uses: ./.github/actions/check
with:
app: computer-go
diff --git a/.github/workflows/desktop-release.yml b/.github/workflows/desktop-release.yml
index ab3022fd..b8532c4d 100644
--- a/.github/workflows/desktop-release.yml
+++ b/.github/workflows/desktop-release.yml
@@ -49,7 +49,7 @@ jobs:
prerelease: ${{ steps.version.outputs.prerelease }}
publish: ${{ steps.version.outputs.publish }}
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v7
- id: version
shell: bash
env:
@@ -102,37 +102,39 @@ jobs:
run: >-
sudo bash -c
'rm -rf /usr/share/dotnet & rm -rf /usr/local/lib/android & rm -rf /opt/ghc & rm -rf /opt/hostedtoolcache/CodeQL & wait'
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v7
- id: versions
shell: bash
run: |
echo "node=$(tr -d '[:space:]' <.node-version)" >>"$GITHUB_OUTPUT"
- echo "go=$(sed -n 's/^go //p' apps/teamhub/go.mod)" >>"$GITHUB_OUTPUT"
- - uses: actions/cache@v4
+ go_ver=$(sed -n 's/^toolchain go//p' apps/teamhub/go.mod | head -n 1)
+ [ -n "$go_ver" ] || go_ver=$(sed -n 's/^go //p' apps/teamhub/go.mod | head -n 1)
+ echo "go=$go_ver" >>"$GITHUB_OUTPUT"
+ - uses: actions/cache@v6
with:
path: ${{ runner.tool_cache }}/node/${{ steps.versions.outputs.node }}
key: toolcache-node-${{ runner.os }}-${{ runner.arch }}-${{ steps.versions.outputs.node }}
- - uses: actions/cache@v4
+ - uses: actions/cache@v6
with:
path: ${{ runner.tool_cache }}/go/${{ steps.versions.outputs.go }}
key: toolcache-go-${{ runner.os }}-${{ runner.arch }}-${{ steps.versions.outputs.go }}
- - uses: pnpm/action-setup@v4
- - uses: actions/setup-node@v4
+ - uses: pnpm/action-setup@v6
+ - uses: actions/setup-node@v7
with:
node-version-file: .node-version
cache: pnpm
# Cache GOMODCACHE once across targets and GOCACHE per target so cross-
# compiled stdlib and TeamHub packages stay warm for darwin-arm64 and win32-x64.
- - uses: actions/setup-go@v5
+ - uses: actions/setup-go@v7
with:
go-version-file: apps/teamhub/go.mod
cache: false
- - uses: actions/cache@v4
+ - uses: actions/cache@v6
with:
path: ~/go/pkg/mod
key: desktop-gomod-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('apps/teamhub/go.sum', 'apps/computer/local-daemon/go.sum', 'contracts/generated/go/go.sum') }}
restore-keys: desktop-gomod-${{ runner.os }}-${{ runner.arch }}-
- - uses: actions/cache@v4
+ - uses: actions/cache@v6
with:
path: ~/.cache/go-build
key: desktop-gobuild-${{ matrix.target }}-${{ steps.versions.outputs.go }}-${{ hashFiles('apps/teamhub/go.sum', 'apps/computer/local-daemon/go.sum', 'contracts/generated/go/go.sum') }}
@@ -140,7 +142,7 @@ jobs:
- run: pnpm install --frozen-lockfile
# Pinned binary downloads reused across releases: Electron, Cua driver,
# native PostgreSQL + voice tools, and the pinned Node.js distribution.
- - uses: actions/cache@v4
+ - uses: actions/cache@v6
with:
path: |
~/.cache/linger-desktop
@@ -151,7 +153,7 @@ jobs:
restore-keys: desktop-downloads-${{ matrix.target }}-
- id: docker-cache
if: matrix.docker_image != ''
- uses: actions/cache@v4
+ uses: actions/cache@v6
with:
path: ~/.cache/linger-docker/${{ matrix.docker_image }}.tar
key: desktop-docker-${{ matrix.docker_image }}-${{ hashFiles(matrix.docker_file) }}
@@ -230,7 +232,7 @@ jobs:
- name: Remove signing files
if: always()
run: rm -rf "$RUNNER_TEMP/signing"
- - uses: actions/upload-artifact@v4
+ - uses: actions/upload-artifact@v7
if: matrix.target != 'win32-x64'
with:
name: desktop-${{ matrix.target }}
@@ -238,7 +240,7 @@ jobs:
if-no-files-found: error
compression-level: 0
retention-days: 14
- - uses: actions/upload-artifact@v4
+ - uses: actions/upload-artifact@v7
if: matrix.target == 'win32-x64'
with:
name: desktop-win32-x64
@@ -248,7 +250,7 @@ jobs:
if-no-files-found: error
compression-level: 0
retention-days: 14
- - uses: actions/upload-artifact@v4
+ - uses: actions/upload-artifact@v7
if: matrix.target == 'win32-x64'
with:
name: desktop-win32-x64-portable
@@ -270,10 +272,10 @@ jobs:
runs-on: windows-2022
timeout-minutes: 25
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v7
with:
persist-credentials: false
- - uses: actions/download-artifact@v4
+ - uses: actions/download-artifact@v8
with:
name: desktop-win32-x64
path: candidate
@@ -293,8 +295,8 @@ jobs:
permissions:
contents: write
steps:
- - uses: actions/checkout@v4
- - uses: actions/download-artifact@v4
+ - uses: actions/checkout@v7
+ - uses: actions/download-artifact@v8
with:
pattern: desktop-*
path: release
diff --git a/apps/linger-installer/package.json b/apps/linger-installer/package.json
index de0cd4eb..fcd2c0bb 100644
--- a/apps/linger-installer/package.json
+++ b/apps/linger-installer/package.json
@@ -4,7 +4,7 @@
"private": true,
"type": "module",
"scripts": {
- "test": "vitest run --maxWorkers=2",
+ "test": "vitest run",
"typecheck": "tsc --noEmit",
"check": "pnpm typecheck && pnpm lint && pnpm test",
"build": "node scripts/build.mjs",
diff --git a/apps/linger-installer/src/server/jobs.test.ts b/apps/linger-installer/src/server/jobs.test.ts
index 0b263b9f..9f8eb26d 100644
--- a/apps/linger-installer/src/server/jobs.test.ts
+++ b/apps/linger-installer/src/server/jobs.test.ts
@@ -77,6 +77,10 @@ test("duplicate starts return current job and task survives subscriber disconnec
return { state: "ready", code: 0, message: "Complete" };
});
const first = await jobs.start(input);
+ cleanup.push(async () => {
+ release?.();
+ await jobs.wait(first.id);
+ });
const second = await jobs.start(input);
expect(second.id).toBe(first.id);
await new Promise((resolve) => setTimeout(resolve, 20));
diff --git a/apps/linger-installer/vite.config.ts b/apps/linger-installer/vite.config.ts
index 6a70a119..c91cde6e 100644
--- a/apps/linger-installer/vite.config.ts
+++ b/apps/linger-installer/vite.config.ts
@@ -4,5 +4,13 @@ export default defineConfig({
plugins: [react()],
build: { outDir: "dist/web", emptyOutDir: true },
server: { host: "127.0.0.1" },
- test: { environment: "node", include: ["src/**/*.test.{ts,tsx}"] },
+ test: {
+ environment: "node",
+ include: ["src/**/*.test.{ts,tsx}"],
+ // Server job and launcher suites exercise real atomic writes (fsync) into tmpdir.
+ // Bound worker concurrency and give shared CI disks 15 s headroom while
+ // keeping local runs strict at 5 s.
+ testTimeout: process.env.CI ? 15_000 : 5_000,
+ maxWorkers: 2,
+ },
});
diff --git a/apps/teamhub-cli/vitest.config.ts b/apps/teamhub-cli/vitest.config.ts
index aa5f0de6..b5db1b59 100644
--- a/apps/teamhub-cli/vitest.config.ts
+++ b/apps/teamhub-cli/vitest.config.ts
@@ -2,11 +2,12 @@ import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
- testTimeout: 5_000,
+ // These suites exercise real filesystem locks, fsync, and directory syncs.
+ // Bound worker concurrency and give shared CI disks 15 s headroom while
+ // keeping local runs strict at 5 s.
+ testTimeout: process.env.CI ? 15_000 : 5_000,
include: ["src/**/*.test.ts"],
setupFiles: ["./vitest.setup.ts"],
- // These suites exercise real filesystem locks, fsync, and recovery journals.
- // Bound disk contention on shared CI runners without extending deadlines.
maxWorkers: 2,
},
});