Skip to content

Migrate build workflow from windows-latest to ubuntu-latest - #43

Open
cjdutoit wants to merge 1 commit into
mainfrom
claude/apiplatform-linux-builds
Open

cjdutoit wants to merge 1 commit into
mainfrom
claude/apiplatform-linux-builds

Conversation

@cjdutoit

Copy link
Copy Markdown
Contributor

Closes #42

What changed

  • NHSDigital.ApiPlatform.Infrastructure/Services/ScriptGenerationService.cs: changed the build job's RunsOn from BuildMachines.WindowsLatest to BuildMachines.UbuntuLatest, and removed the now-unnecessary Windows-only "Enable long paths for Git" step.
  • .github/workflows/build.yml regenerated from the Infrastructure project (never hand-edited).

Verification performed

  • No database dependency: grepped the whole repo for UseSqlServer, UseNpgsql, DbContext, dotnet ef, ConnectionStrings — no matches in actual project code (only unrelated skill/template examples under .agents/). This is a simple runner-only swap.
  • PowerShell steps: all three test steps (Run Unit Tests, Run Acceptance Tests, Run Integration Tests) already declare Shell = "pwsh" explicitly in the C# source, so they continue to run correctly on ubuntu-latest (pwsh is preinstalled there) — no rewrite needed.
  • No .esproj projects in this repo.
  • ProjectReference casing: verified all ProjectReference paths match actual directory names exactly (checked with ls -d).
  • No stray EnvironmentVariables dictionary present to clean up.
  • Regenerated build.yml diffed against the committed version — only the intended runs-on change and step removal, all other logic (test scripts, tag/release/publish jobs) untouched.
  • prLinter.yml regenerated with the same tool but showed unrelated ADotNet package version drift (new prefix categories, try/catch wrapping) — reverted to keep this PR scoped to the runner migration only.
  • python3 -c "import yaml; yaml.safe_load(...)" — YAML parses cleanly.
  • actionlint — passes with no errors on build.yml and prLinter.yml.
  • dotnet build NHSDigital.ApiPlatform.slnx — full solution builds with 0 errors (34 pre-existing nullable-annotation warnings unrelated to this change).

🤖 Generated with Claude Code

https://claude.ai/code/session_013qa2PSvtyXPgZbxPyD8Uro


Generated by Claude Code

Updates the Build job's RunsOn in ScriptGenerationService.cs to
BuildMachines.UbuntuLatest and regenerates .github/workflows/build.yml
from the Infrastructure project. Also removes the now-unnecessary
Windows-only "Enable long paths for Git" step. Test steps already
declared Shell = "pwsh" explicitly, so they continue to run correctly
on ubuntu-latest (pwsh is preinstalled there).

Verified no database dependency (no UseSqlServer/UseNpgsql/DbContext/
dotnet ef/ConnectionStrings usage in project code), no .esproj
projects, and no ProjectReference casing mismatches.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013qa2PSvtyXPgZbxPyD8Uro
Copilot AI lite review requested due to automatic review settings September 10, 2026 23:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

A successful Ubuntu workflow run is required before merging.

Pull request overview

Migrates the generated CI build workflow from Windows to Ubuntu.

Changes:

  • Switches the build runner to ubuntu-latest.
  • Removes the Windows-only Git long-path step.
  • Regenerates .github/workflows/build.yml.
File summaries
File Summary
NHSDigital.ApiPlatform.Infrastructure/Services/ScriptGenerationService.cs Updates the generated runner configuration and removes the Windows-only step.
.github/workflows/build.yml Reflects the regenerated Ubuntu-based workflow.
Review details

Suppressed comments (1)

NHSDigital.ApiPlatform.Infrastructure/Services/ScriptGenerationService.cs:44

  • This runner switch changes the execution environment for all three pwsh test loops, but the listed verification only builds locally and parses/lints YAML; it does not execute the generated workflow on Ubuntu. Please obtain a successful Ubuntu workflow run before merging so Linux-only path, shell, or test failures cannot reach main.
                            RunsOn = BuildMachines.UbuntuLatest,
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate CI build pipeline to Ubuntu (Linux) runner

3 participants