Patterns for setting up a .NET CI pipeline with GitHub Actions and xUnit test projects
When bootstrapping a .NET project's CI pipeline and initial test infrastructure. Applies to any .NET solution using GitHub Actions and xUnit.
.github/workflows/ci.yml with three steps: dotnet restore, dotnet build --no-restore, dotnet test --no-builddotnet new xunit template to generate test projects — it produces correct package versions and includes global <Using Include="Xunit" />tests/ directory, added to solution under a /tests/ folderAssert.True(true)) so CI has something to run from day one — proves the pipeline is wired end to end<IsTestProject>true</IsTestProject> in csproj so dotnet test discovers the project# .github/workflows/ci.yml