From e94d6b3293e5ce732168e939d742ff520fa0d6b6 Mon Sep 17 00:00:00 2001 From: Nick Cipollina Date: Fri, 17 Jul 2026 11:35:18 -0400 Subject: [PATCH 1/2] Add PR build workflow via devops-templates reusable pipeline Restores/builds/tests SharpMud.slnx on every PR against main, using this repo's xUnit v3 + Microsoft Testing Platform setup (useMtpRunner: true). runCdk: false since this repo deploys as a plain Docker image (see deployment.md), not AWS CDK/Lambda - the reusable workflow's CDK/Lambda inputs and secrets are simply unused. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/pr-build.yaml | 18 ++++++++++++++++++ docs/deployment.md | 20 ++++++++++++++++++-- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/pr-build.yaml diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml new file mode 100644 index 0000000..15e9bcc --- /dev/null +++ b/.github/workflows/pr-build.yaml @@ -0,0 +1,18 @@ +name: PR Build + +on: + pull_request: + branches: + - main + workflow_dispatch: +permissions: + contents: read +jobs: + build: + uses: LayeredCraft/devops-templates/.github/workflows/pr-build.yaml@v10.1 + with: + solution: "SharpMud.slnx" + hasTests: true + useMtpRunner: true + runCdk: false + dotnetVersion: "11.0.x" diff --git a/docs/deployment.md b/docs/deployment.md index 1facbaa..9b49380 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -58,6 +58,20 @@ image → data still there test. ASCII/English, so invariant globalization mode avoids needing the larger `-extra` image variant for culture data nothing uses. +## Continuous Integration + +`.github/workflows/pr-build.yaml` runs on every PR against `main` +(`workflow_dispatch` also available for a manual run) — restores, builds, +and runs the full test suite (`SharpMud.slnx`, `hasTests: true`, +`useMtpRunner: true` to match this repo's xUnit v3 + Microsoft Testing +Platform setup, per `testing.md`). It's a thin caller into +[`LayeredCraft/devops-templates`](https://github.com/LayeredCraft/devops-templates)'s +reusable `pr-build.yaml`, the same pattern other LayeredCraft repos use — +not a bespoke pipeline. `runCdk: false` since this repo deploys as a plain +Docker image (see Container above), not AWS CDK/Lambda; the reusable +workflow's CDK/Lambda-function inputs and secrets are simply unused here. +No image build/publish step yet — see Open Items. + ## Verified Built and run locally via Docker: image builds clean (no warnings), the @@ -88,8 +102,10 @@ wouldn't stop cleanly before the fix. check yet beyond "process is running." - Multi-arch image builds (arm64 + amd64) — currently only built for the local dev machine's architecture. -- CI-driven image builds/publishing — no pipeline exists yet; images are - built manually. +- ~~CI-driven build/test~~ — resolved, see Continuous Integration above. + Still open: CI-driven **image** builds/publishing — the PR workflow only + builds/tests the .NET solution, it doesn't build or push the Docker + image; that's still done manually. - No documentation/tooling yet for backing up the `/data` volume itself — the volume mount solves "survives a redeploy," not "survives host disk loss." From 6b5ddbbf0f9a05ab0f6204385afda98ccde3b195 Mon Sep 17 00:00:00 2001 From: Nick Cipollina Date: Fri, 17 Jul 2026 11:40:07 -0400 Subject: [PATCH 2/2] Fix PR Build startup failure: match required reusable-workflow permissions The reusable pr-build.yaml declares id-token/contents/pull-requests write at the workflow level; GitHub validates a caller's granted permissions against that before any job starts, so trimming this down to contents: read (since runCdk: false means those scopes go unused at runtime) caused a zero-job startup_failure - the check happens at dispatch time regardless of which code paths actually run. Matching trivia-manager's known-working permissions block instead. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/pr-build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml index 15e9bcc..28fb83b 100644 --- a/.github/workflows/pr-build.yaml +++ b/.github/workflows/pr-build.yaml @@ -6,7 +6,9 @@ on: - main workflow_dispatch: permissions: - contents: read + id-token: write + contents: write + pull-requests: write jobs: build: uses: LayeredCraft/devops-templates/.github/workflows/pr-build.yaml@v10.1