From d6c9f9f94c97123f44139217dd40ef37441e7d03 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 11 Nov 2026 14:29:44 +0000 Subject: [PATCH 1/2] ci: shared setup from mgpl-diagnostics/.github (npm cache, MongoDB/apt caches), keep main runs Temporary: points at the .github PR branch to measure; switched to @main before merge. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_018jBohnZEym7gZYsPkBCmVg --- .github/workflows/ci.yml | 22 +++++++++++----------- .github/workflows/docker.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da2763b..ebd6c99 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ permissions: concurrency: group: ci-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: # The job id "ci" is the required status check on main (see mgpl-diagnostics/.github scripts/protect-repos.mjs). @@ -26,20 +26,20 @@ jobs: options: --health-cmd "redis-cli ping" --health-interval 5s --health-timeout 3s --health-retries 10 steps: - uses: actions/checkout@v7 - - uses: actions/setup-node@v7 - with: - node-version: 22 - registry-url: https://npm.pkg.github.com - scope: "@mgpl-diagnostics" # The kits come from GitHub Packages at the versions pinned in package-lock.json. # (`npm run kits` still builds unreleased kit branches from source for local testing.) - - run: npm ci - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: mgpl-diagnostics/.github/actions/node@claude/project-thread-dsh6g4 + with: + github-packages: "true" + token: ${{ secrets.GITHUB_TOKEN }} + install: npm ci --no-audit --no-fund + mongodb: "true" - run: npm run typecheck # the [pgbouncer] and [replicas] checks run the API through PgBouncer in transaction mode - - name: Install PgBouncer - run: sudo apt-get update -q && sudo apt-get install -y -q pgbouncer + # from cached .debs, so a mirror outage no longer holds the run (it once failed after five minutes) + - uses: mgpl-diagnostics/.github/actions/apt@claude/project-thread-dsh6g4 + with: + packages: pgbouncer - name: End-to-end tests (GraphQL over HTTP, tokens, worker on Redis, client SDK) on PostgreSQL, PostgreSQL through PgBouncer and MongoDB run: npm test env: diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..4f88fc5 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,29 @@ +name: Docker + +# Builds the image on every PR and on main without pushing, to catch Dockerfile bugs before a release +# (a missing COPY, a dependency dropped by `npm prune`, a native module that fails to load). +# Pushing to GHCR stays in release.yml (v* tag or manual run on main). The build itself lives in +# mgpl-diagnostics/.github (.github/workflows/docker-build.yml), shared with the dashboard. +on: + push: + branches: [main] + paths-ignore: ["**.md", "docs/**", "test/**", "llms.txt", "llms-full.txt", "schema.graphql", "LICENSE"] + pull_request: + paths-ignore: ["**.md", "docs/**", "test/**", "llms.txt", "llms-full.txt", "schema.graphql", "LICENSE"] + +permissions: + contents: read + packages: read + +concurrency: + group: docker-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + docker: + uses: mgpl-diagnostics/.github/.github/workflows/docker-build.yml@claude/project-thread-dsh6g4 + with: + # loads every kit the api imports (report-kit's native resvg included) from the pruned node_modules + smoke: >- + docker run --rm "$IMAGE" node --input-type=module + -e "await import('/app/dist/index.js'); console.log('api image: every module loads'); process.exit(0)" From 06ffbb687d4e51e79f0748e05cf343d5c6ccd2d2 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 11 Nov 2026 18:28:27 +0000 Subject: [PATCH 2/2] ci: use the shared actions from main Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_018jBohnZEym7gZYsPkBCmVg --- .github/workflows/ci.yml | 4 ++-- .github/workflows/docker.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ebd6c99..e806145 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: - uses: actions/checkout@v7 # The kits come from GitHub Packages at the versions pinned in package-lock.json. # (`npm run kits` still builds unreleased kit branches from source for local testing.) - - uses: mgpl-diagnostics/.github/actions/node@claude/project-thread-dsh6g4 + - uses: mgpl-diagnostics/.github/actions/node@main with: github-packages: "true" token: ${{ secrets.GITHUB_TOKEN }} @@ -37,7 +37,7 @@ jobs: - run: npm run typecheck # the [pgbouncer] and [replicas] checks run the API through PgBouncer in transaction mode # from cached .debs, so a mirror outage no longer holds the run (it once failed after five minutes) - - uses: mgpl-diagnostics/.github/actions/apt@claude/project-thread-dsh6g4 + - uses: mgpl-diagnostics/.github/actions/apt@main with: packages: pgbouncer - name: End-to-end tests (GraphQL over HTTP, tokens, worker on Redis, client SDK) on PostgreSQL, PostgreSQL through PgBouncer and MongoDB diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 4f88fc5..2813d45 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -21,7 +21,7 @@ concurrency: jobs: docker: - uses: mgpl-diagnostics/.github/.github/workflows/docker-build.yml@claude/project-thread-dsh6g4 + uses: mgpl-diagnostics/.github/.github/workflows/docker-build.yml@main with: # loads every kit the api imports (report-kit's native resvg included) from the pruned node_modules smoke: >-