mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-12-01 01:14:47 +00:00
Run on Bun: bun install, bun --bun next, both dev2 sites on Bun
Moves logicsrc.com and app.logicsrc.com (one image) off Node + npm onto Bun, following the fleet recipe (phonenumbers.bot pilot). - Package manager: bun.lock migrated from package-lock.json, so every resolved version is unchanged; packageManager bun@1.4.2. Root scripts run each workspace with `bun run --cwd <dir>` instead of `npm --workspace`. - Bun 1.4.2, not the fleet's 1.4.0: 1.4.0 re-resolves this workspace's `file:` cross-references differently on every install, so its own lockfile never passes --frozen-lockfile. 1.4.2 is stable on it. - Runtime: logicsrc-web runs `bun --bun next build/start`; apps/pwa (Express, app.logicsrc.com) runs `bun src/server.mjs`. - Image: .nixpacks/Dockerfile (the path both dev2 compose stacks build) is now a hand-written oven/bun image carrying the whole workspace, run as the non-root bun user. ENTRYPOINT stays `bash -l -c` so a compose `command:` is one string, as before; app.logicsrc.com's compose starts it with "npm --workspace @logicsrc/pwa run start", which .nixpacks/npm (the image's only `npm`) turns into `bun run start` in apps/pwa. Port 3000, the PUBLIC_URL build arg and the / health path are unchanged. The nixpacks .nix and build.sh are gone. - CI: both workflows install with bun and run every script through bun (Node stays only as the interpreter for vitest/tsc/node --test/Playwright, as before), and CI now boots the site under Bun. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e62c546a1e
commit
d5252fb167
13 changed files with 1913 additions and 9608 deletions
32
.github/workflows/ci.yml
vendored
32
.github/workflows/ci.yml
vendored
|
|
@ -20,26 +20,44 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Bun is the package manager and the production runtime; the version comes
|
||||
# from packageManager in package.json, the same Bun the image pins.
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version-file: package.json
|
||||
|
||||
# Node stays as the interpreter for the test tooling (vitest, tsc,
|
||||
# node --test, Playwright), which ran on Node 24 before.
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 24
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
- name: Build and unit tests
|
||||
run: npm run check
|
||||
run: bun run check
|
||||
|
||||
- name: Validate schema fixtures
|
||||
run: npm run schemas:validate
|
||||
run: bun run schemas:validate
|
||||
|
||||
- name: API contract tests
|
||||
run: npm run test:contract
|
||||
run: bun run test:contract
|
||||
|
||||
- name: The site serves under Bun
|
||||
run: |
|
||||
(PORT=3000 bun run start > /tmp/web.log 2>&1 &)
|
||||
for i in $(seq 1 60); do
|
||||
code=$(curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:3000/ || true)
|
||||
[ "$code" = 200 ] && { echo "/ -> $code"; exit 0; }
|
||||
sleep 1
|
||||
done
|
||||
cat /tmp/web.log; exit 1
|
||||
|
||||
- name: Install Playwright browsers
|
||||
run: npx playwright install --with-deps chromium
|
||||
run: bunx playwright install --with-deps chromium
|
||||
|
||||
- name: Playwright E2E
|
||||
run: npm run test:e2e
|
||||
run: bun run test:e2e
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue