-
Notifications
You must be signed in to change notification settings - Fork 171
Add AGENTS.md with comprehensive build and test documentation #1627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
1f8bb8d
Initial plan
Copilot efa11e0
Add AGENTS.md with comprehensive build and test instructions
Copilot ca5ddbe
Fix Docker service networking configuration in AGENTS.md
Copilot b37bdce
Change JavaScriptEncoder from UnsafeRelaxedJsonEscaping to Create wit…
Copilot 483a414
Update AGENTS.md: require only .NET SDK 10.0 (runtimes for 8/9), add …
Copilot 1f1500a
Revert JavaScriptEncoder changes and add testing requirements to AGEN…
Copilot e6c5489
Scope UnsafeRelaxedJsonEscaping to RouteMappings endpoint only
Copilot fb6b63a
Add general guidelines section to AGENTS.md
Copilot 6f44c07
Apply suggestions from code review
TimHess e4f05b1
revise agents.md to point to existing github workflows
TimHess dc079d3
Apply suggestion from @bart-vmware
TimHess 22c5794
Apply suggestion from @bart-vmware
TimHess fcbd53c
Revert JsonSerializerOptions changes and rename DefaultJsonSerializer…
Copilot 2fd940c
Simplify Quick Start section in AGENTS.md
Copilot 16b3507
Merge branch 'main' of https://github.com/SteeltoeOSS/Steeltoe into c…
Copilot 73c60c8
Merge main and update AGENTS.md with integration test container requi…
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| # Steeltoe Build and Test Guide for Developers and CI/CD Agents | ||
|
|
||
| This document provides essential guidelines for working with the Steeltoe codebase. For detailed build and test procedures, refer to the [GitHub workflows](.github/workflows/) which serve as the source of truth. | ||
|
|
||
| ## General Guidelines | ||
|
|
||
| ### Code Review and Suggestions | ||
| - Only make high confidence suggestions when reviewing code changes. | ||
| - Always use the latest stable version of C#. | ||
| - Never add or change `global.json` unless explicitly asked to. | ||
| - Never change `NuGet.config` files unless explicitly asked to. | ||
|
|
||
| ### Null Handling | ||
| - Declare variables non-nullable, and check for null at public API entry points. | ||
| - For internal code, trust the C# null annotations and don't add null checks when the type system says a value cannot be null. | ||
|
|
||
| ### Writing Tests | ||
| - Do not emit "Act", "Arrange" or "Assert" comments in test code. | ||
| - Tests should pass before committing and pushing changes. | ||
| - When possible, code coverage levels should be increased or at least maintained. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - **.NET SDK 10.0** (latest patch version) | ||
| - **.NET Runtime 8.0** (latest patch version) | ||
| - **.NET Runtime 9.0** (latest patch version) | ||
|
|
||
| Verify your installation: | ||
| ```bash | ||
| dotnet --list-sdks | ||
| dotnet --list-runtimes | ||
| ``` | ||
|
|
||
| ## Quick Start | ||
|
|
||
| For quick iteration during development: | ||
| ```bash | ||
| dotnet build | ||
| dotnet test | ||
| ``` | ||
|
|
||
| For final validation before committing changes: | ||
| ```bash | ||
| dotnet build src/Steeltoe.All.sln --configuration Release | ||
| dotnet test src/Steeltoe.All.sln --configuration Release | ||
| ``` | ||
|
|
||
| ### Run Tests | ||
|
|
||
| For detailed test procedures including environment-specific filters, test categories, and coverage collection, see [`.github/workflows/Steeltoe.All.yml`](.github/workflows/Steeltoe.All.yml). | ||
|
|
||
| **Important context for agents:** | ||
| - Tests run on multiple frameworks: net8.0, net9.0, and net10.0 | ||
| - Tests use xUnit trait categories: `Integration` (requires Docker services), `MemoryDumps` (generates memory dumps) | ||
| - Platform-specific test skipping uses attributes like `[FactSkippedOnPlatform]` and `[TheorySkippedOnPlatform]` instead of trait categories | ||
| - Integration tests require Docker containers to be running (e.g., Config Server, Eureka Server) and are primarily designed for Linux CI environments | ||
| - When writing tests, use `[Trait("Category", "Integration")]` for tests requiring external services like Docker containers | ||
|
|
||
| ## Code Style Validation | ||
|
|
||
| Steeltoe uses ReSharper/Rider code cleanup tools via `regitlint` to enforce consistent code style. The CI workflow (`.github/workflows/verify-code-style.yml`) automatically verifies code style on all pull requests. | ||
|
|
||
| To run code cleanup locally: | ||
| ```powershell | ||
| ./cleanupcode.ps1 main | ||
| ``` | ||
|
|
||
| If your PR fails the code style check, run `cleanupcode.ps1` locally and commit the changes. | ||
|
|
||
| ## Additional Resources | ||
|
|
||
| - [Steeltoe Documentation](https://steeltoe.io/) | ||
| - [Contributing Guidelines](https://github.com/SteeltoeOSS/Steeltoe/wiki) | ||
| - [CI Workflow](.github/workflows/Steeltoe.All.yml) | ||
| - [Code Style Workflow](.github/workflows/verify-code-style.yml) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.