Skip to content

Add GitHub Actions CI workflow to gate PRs on API build and test success#10

Merged
WillHAdair merged 2 commits intomainfrom
copilot/add-github-actions-build-test
Mar 15, 2026
Merged

Add GitHub Actions CI workflow to gate PRs on API build and test success#10
WillHAdair merged 2 commits intomainfrom
copilot/add-github-actions-build-test

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 15, 2026

No CI existed to validate changes before merging into main. PRs could be merged regardless of build or test failures.

Changes

  • .github/workflows/api-ci.yml — new workflow triggered on pull_request targeting main:
    • Runs on ubuntu-latest (Docker available for Testcontainers.MsSql)
    • Sets up .NET 10.0, restores, builds (Release), and runs the full xUnit suite
    • Job scoped to permissions: contents: read
on:
  pull_request:
    branches:
      - main

jobs:
  build-and-test:
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-dotnet@v4
        with:
          dotnet-version: '10.0.x'
      - run: dotnet restore
        working-directory: API
      - run: dotnet build --no-restore --configuration Release
        working-directory: API
      - run: dotnet test --no-build --configuration Release --verbosity normal
        working-directory: API

Branch Protection Required

The workflow reports pass/fail but merging is only blocked once a branch protection rule is configured:

Settings → Branches → main → Require status checks → add "Build and Test"


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: WillHAdair <88009623+WillHAdair@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GitHub Actions for API build and test suite Add GitHub Actions CI workflow to gate PRs on API build and test success Mar 15, 2026
Copilot AI requested a review from WillHAdair March 15, 2026 18:34
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 15, 2026

@WillHAdair Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 19b37b05-5f4d-4e34-aba1-8ccfce2b321d

Sorry for the inconvenience!

@WillHAdair WillHAdair marked this pull request as ready for review March 15, 2026 18:44
@WillHAdair WillHAdair merged commit 003a3ee into main Mar 15, 2026
1 check passed
@WillHAdair WillHAdair deleted the copilot/add-github-actions-build-test branch March 15, 2026 18:49
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.

2 participants