fix: add code coverage support and fix static site api proxy behavior#55
fix: add code coverage support and fix static site api proxy behavior#55ncipollina merged 2 commits intomainfrom
Conversation
- Add /api CloudFront behavior alongside /api/* for proper API proxying - Add Microsoft.Testing.Extensions.CodeCoverage package for test coverage - Add global.json to configure Microsoft.Testing.Platform runner - Enable code coverage in CI with 80% threshold - Update AwesomeAssertions to 9.4.0 - Bump version to 2.1.5 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e88a363a1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
.github/workflows/pr-build.yaml
Outdated
There was a problem hiding this comment.
Pin reusable workflow to immutable ref
Referencing the reusable workflow by branch name makes CI behavior non-deterministic, because any new commit (or branch deletion/force-push) on refactor/simplify-mtp-test-coverage will change or break this repo’s PR pipeline without any change here. Pinning to a tag or commit SHA avoids unexpected build regressions and keeps historical runs reproducible.
Useful? React with 👍 / 👎.
- Pin both build and pr-build workflows to devops-templates@v7.0 - Enable code coverage with 80% threshold in build.yaml - Remove testDirectory param (no longer needed in v7.0) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🚀 Pull Request
📋 Summary
This PR adds two key improvements:
StaticSiteConstruct fix: The CloudFront API proxy was only adding a behavior for
/api/*but not/apiitself, which meant requests to the bare/apipath were not being proxied to the backend. Both/apiand/api/*behaviors now share the same origin and options.Code coverage support: Integrates
Microsoft.Testing.Extensions.CodeCoverageinto the test project and configures the CI pipeline to enforce an 80% coverage threshold. Addsglobal.jsonto configure the Microsoft.Testing.Platform runner.✅ Checklist
🧪 Related Issues or PRs
Closes #...
💬 Notes for Reviewers
refactor/simplify-mtp-test-coverageon the devops-templates repo — this should be updated to a stable tag once that branch is merged.global.jsononly contains test runner config (not a SDK version pin), so it shouldn't affect build behavior.AwesomeAssertionsbumped to 9.4.0 as a minor update alongside the other dependency changes.