Skip to content

Add a build/test CI check; bump Actions to latest majors - #30

Merged
shimat merged 2 commits into
mainfrom
ci/add-build-check-and-tests
Jul 20, 2026
Merged

Add a build/test CI check; bump Actions to latest majors#30
shimat merged 2 commits into
mainfrom
ci/add-build-check-and-tests

Conversation

@shimat

@shimat shimat commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add .github/workflows/ci.yml: on push/PR to main, restores, builds (Debug), and runs tests — a fast signal for whether a Renovate dependency bump still builds, without needing the Release-only wasm-opt workaround already in deploy-pages.yml.
  • Add BlazorApp.Tests, an xUnit v3 (xunit.v3.mtp-v2) project referencing BlazorApp and covering SampleCatalog's invariants: unique routes, every route resolves to an actual @page route (checked via reflection over the built assembly's RouteAttributes), required metadata fields are populated, and ByCategory accounts for every sample exactly once.
  • Add global.json opting into the Microsoft.Testing.Platform dotnet test runner, required for xunit.v3.mtp-v2 on the .NET 10 SDK.
  • Bump actions/checkout v4→v7, actions/setup-dotnet v4→v6, actions/upload-pages-artifact v3→v5, actions/deploy-pages v4→v5 in both workflows.

Test plan

  • dotnet restore / dotnet build -c Debug / dotnet test BlazorApp.Tests all pass locally from a clean checkout (27/27 tests).
  • CI run on this PR is green.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added automated checks to verify sample routes, metadata, and category coverage.
    • Added a dedicated test project targeting .NET 10.
  • CI/CD

    • Added continuous build and test validation for pull requests and pushes to the main branch.
    • Updated GitHub Pages deployment actions to newer versions.
  • Bug Fixes

    • Improved detection of missing, duplicate, or mismatched sample routes and metadata.

Renovate was set up recently but there was no way to quickly confirm a
dependency bump still builds. Adds a CI workflow that restores, builds
(Debug, to sidestep the Release-only wasm-opt workaround already in
deploy-pages.yml), and runs a new BlazorApp.Tests project covering
SampleCatalog's route/metadata invariants. Also bumps actions/checkout,
actions/setup-dotnet, actions/upload-pages-artifact, and
actions/deploy-pages to their current major versions.
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@shimat, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 29 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8087b76b-4e9a-4245-a79b-43a272071f1c

📥 Commits

Reviewing files that changed from the base of the PR and between 688a076 and d6ee6b5.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
📝 Walkthrough

Walkthrough

The PR adds .NET 10 xUnit tests for SampleCatalog, registers the test project in the solution, configures Microsoft Testing Platform, introduces CI build and test automation, and upgrades GitHub Pages deployment actions.

Changes

Test automation

Layer / File(s) Summary
Test project setup
BlazorApp.Tests/BlazorApp.Tests.csproj, BlazorApp.Tests/xunit.runner.json, global.json, OpenCvSharpBlazorSamples.sln
Adds the .NET 10 executable xUnit project, runner configuration, Microsoft Testing Platform selection, and solution build mappings.
Sample catalog validation
BlazorApp.Tests/SampleCatalogTests.cs
Adds tests for route uniqueness and matching pages, required sample metadata, and complete category accounting.
Continuous integration execution
.github/workflows/ci.yml
Adds pull request and main-branch push automation to restore, build, and test the solution with the WebAssembly workload in Debug mode.

Pages deployment updates

Layer / File(s) Summary
GitHub Pages action upgrades
.github/workflows/deploy-pages.yml
Upgrades checkout, .NET setup, Pages artifact upload, and Pages deployment actions while preserving the existing workflow logic.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding CI build/test automation and updating GitHub Actions majors.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/add-build-check-and-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/ci.yml:
- Line 13: Update the actions/checkout step to set persist-credentials to false,
preventing the GitHub token from being stored in local Git configuration while
preserving the existing checkout behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f75aeaba-be29-47af-b4eb-f5b4917750e8

📥 Commits

Reviewing files that changed from the base of the PR and between deb035c and 688a076.

📒 Files selected for processing (7)
  • .github/workflows/ci.yml
  • .github/workflows/deploy-pages.yml
  • BlazorApp.Tests/BlazorApp.Tests.csproj
  • BlazorApp.Tests/SampleCatalogTests.cs
  • BlazorApp.Tests/xunit.runner.json
  • OpenCvSharpBlazorSamples.sln
  • global.json

Comment thread .github/workflows/ci.yml
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@shimat shimat self-assigned this Jul 20, 2026
@shimat
shimat merged commit d185a49 into main Jul 20, 2026
1 of 2 checks passed
@shimat
shimat deleted the ci/add-build-check-and-tests branch July 20, 2026 00:27
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.

1 participant