Merge pull request 'fix(ci): build all service images + upgrade Node 22 + pin packageManager (GRO-1522)' (#44) from fix/gro-1522-ci-images-node22 into dev
CI / Lint & Typecheck (push) Failing after 12s
CI / Test (push) Failing after 21s
CI / Build & Push Docker Images (push) Has been skipped

fix(ci): build all service images + upgrade Node 22 + pin packageManager (GRO-1522)

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit was merged in pull request #44.
This commit is contained in:
2026-05-22 02:58:30 +00:00
6 changed files with 64 additions and 14 deletions
+43 -3
View File
@@ -25,7 +25,7 @@ jobs:
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 20 node-version: 22
cache: pnpm cache: pnpm
- name: Install dependencies - name: Install dependencies
@@ -49,7 +49,7 @@ jobs:
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 20 node-version: 22
cache: pnpm cache: pnpm
- name: Install dependencies - name: Install dependencies
@@ -59,7 +59,7 @@ jobs:
run: pnpm test run: pnpm test
docker: docker:
name: Build & Push Docker Image name: Build & Push Docker Images
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [lint-typecheck, test] needs: [lint-typecheck, test]
steps: steps:
@@ -91,9 +91,49 @@ jobs:
with: with:
context: . context: .
file: Dockerfile file: Dockerfile
target: runner
push: true push: true
tags: | tags: |
git.farh.net/groombook/api:${{ steps.version.outputs.tag }} git.farh.net/groombook/api:${{ steps.version.outputs.tag }}
${{ github.ref == 'refs/heads/main' && 'git.farh.net/groombook/api:latest' || '' }} ${{ github.ref == 'refs/heads/main' && 'git.farh.net/groombook/api:latest' || '' }}
cache-from: type=registry,ref=git.farh.net/groombook/cache:api cache-from: type=registry,ref=git.farh.net/groombook/cache:api
cache-to: type=registry,ref=git.farh.net/groombook/cache:api,mode=max cache-to: type=registry,ref=git.farh.net/groombook/cache:api,mode=max
- name: Build and push Migrate image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
target: migrate
push: true
tags: |
git.farh.net/groombook/migrate:${{ steps.version.outputs.tag }}
${{ github.ref == 'refs/heads/main' && 'git.farh.net/groombook/migrate:latest' || '' }}
cache-from: type=registry,ref=git.farh.net/groombook/cache:migrate
cache-to: type=registry,ref=git.farh.net/groombook/cache:migrate,mode=max
- name: Build and push Seed image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
target: seed
push: true
tags: |
git.farh.net/groombook/seed:${{ steps.version.outputs.tag }}
${{ github.ref == 'refs/heads/main' && 'git.farh.net/groombook/seed:latest' || '' }}
cache-from: type=registry,ref=git.farh.net/groombook/cache:seed
cache-to: type=registry,ref=git.farh.net/groombook/cache:seed,mode=max
- name: Build and push Reset image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
target: reset
push: true
tags: |
git.farh.net/groombook/reset:${{ steps.version.outputs.tag }}
${{ github.ref == 'refs/heads/main' && 'git.farh.net/groombook/reset:latest' || '' }}
cache-from: type=registry,ref=git.farh.net/groombook/cache:reset
cache-to: type=registry,ref=git.farh.net/groombook/cache:reset,mode=max
+3 -3
View File
@@ -25,7 +25,7 @@ jobs:
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 20 node-version: 22
cache: pnpm cache: pnpm
- name: Install dependencies - name: Install dependencies
@@ -49,7 +49,7 @@ jobs:
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 20 node-version: 22
cache: pnpm cache: pnpm
- name: Install dependencies - name: Install dependencies
@@ -71,7 +71,7 @@ jobs:
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 20 node-version: 22
cache: pnpm cache: pnpm
- name: Install dependencies - name: Install dependencies
+2 -2
View File
@@ -1,4 +1,4 @@
FROM node:20-alpine AS base FROM node:22-alpine AS base
RUN corepack enable && corepack prepare pnpm@9.15.4 --activate RUN corepack enable && corepack prepare pnpm@9.15.4 --activate
WORKDIR /app WORKDIR /app
@@ -20,7 +20,7 @@ RUN pnpm --filter @groombook/types build && \
pnpm --filter @groombook/api build pnpm --filter @groombook/api build
# Runtime # Runtime
FROM node:20-alpine AS runner FROM node:22-alpine AS runner
RUN corepack enable && corepack prepare pnpm@9.15.4 --activate RUN corepack enable && corepack prepare pnpm@9.15.4 --activate
WORKDIR /app WORKDIR /app
ENV NODE_ENV=production ENV NODE_ENV=production
@@ -135,7 +135,7 @@ function makeDeleteChainable(): unknown {
} }
if (prop === "returning") { if (prop === "returning") {
return () => { return () => {
const row = petRows[0]; const row = petRows[0]!;
deletedId = row.id as string; deletedId = row.id as string;
return [row]; return [row];
}; };
@@ -165,10 +165,10 @@ vi.mock("../db", async (importOriginal) => {
}), }),
pets, pets,
appointments, appointments,
and: db.and, and: vi.fn(),
eq: db.eq, eq: vi.fn(),
exists: db.exists, exists: vi.fn(),
or: db.or, or: vi.fn(),
}; };
}); });
+9
View File
@@ -67,6 +67,11 @@ vi.mock("../db", () => {
{ get: (t, p) => (p === "_name" ? "impersonationSessions" : { table: "impersonationSessions", column: p }) } { get: (t, p) => (p === "_name" ? "impersonationSessions" : { table: "impersonationSessions", column: p }) }
); );
const impersonationAuditLogs = new Proxy(
{ _name: "impersonationAuditLogs" },
{ get: (t, p) => (p === "_name" ? "impersonationAuditLogs" : { table: "impersonationAuditLogs", column: p }) }
);
const appointments = new Proxy( const appointments = new Proxy(
{ _name: "appointments" }, { _name: "appointments" },
{ get: (t, p) => (p === "_name" ? "appointments" : { table: "appointments", column: p }) } { get: (t, p) => (p === "_name" ? "appointments" : { table: "appointments", column: p }) }
@@ -99,8 +104,12 @@ vi.mock("../db", () => {
}), }),
}), }),
}), }),
insert: () => ({
values: () => ({ returning: () => [{}] }),
}),
}), }),
impersonationSessions, impersonationSessions,
impersonationAuditLogs,
appointments, appointments,
eq: vi.fn(), eq: vi.fn(),
and: vi.fn(), and: vi.fn(),
+1
View File
@@ -3,6 +3,7 @@
"version": "0.0.1", "version": "0.0.1",
"private": true, "private": true,
"type": "module", "type": "module",
"packageManager": "pnpm@9.15.4",
"scripts": { "scripts": {
"dev": "tsx watch src/index.ts", "dev": "tsx watch src/index.ts",
"build": "tsc --project .", "build": "tsc --project .",