This repository includes several GitHub Actions workflows for continuous integration and deployment.
Triggers: Push/PR to main or develop branches
What it does:
- Sets up .NET 9.0 environment
- Provides SQL Server service for database tests
- Builds all core projects (excluding Database project which requires .NET Framework)
- Runs all test suites:
- Domain tests (always runs)
- Infrastructure tests (with SQL Server, allows failures)
- API Integration tests (allows failures if Docker issues)
- Publishes the API project
- Collects code coverage reports
Projects built:
- WarehouseEngine.Domain
- WarehouseEngine.Application
- WarehouseEngine.Infrastructure
- WarehouseEngine.Api
- All test projects
Triggers: Push/PR to main or develop branches, but only when API-related files change
What it does:
- Focused on API project specifically
- Builds and tests only API-related components
- Creates deployable API artifacts
- Optimized for faster feedback on API changes
Triggers: Manual dispatch or daily at 2 AM UTC
What it does:
- Simple build verification
- Tests API publishing capability
- No tests, just compilation verification
- Useful for dependency updates or general health checks
The main CI workflow includes a SQL Server 2022 service for Infrastructure tests that require database connectivity.
- Infrastructure tests allow failures (SQL Server connectivity issues)
- API Integration tests allow failures (Docker environment issues)
- Build continues even if some tests fail to provide maximum feedback
All test runs collect XPlat Code Coverage for local analysis.
- API builds are uploaded as artifacts with 7-day retention
- Published API output is available for deployment
- Requires GitHub Actions runners with:
- .NET 9.0 support
- Docker support (for API Integration tests)
- SQL Server service support
The build excludes the WarehouseEngine.Database project as it requires .NET Framework 4.7.2, which is not available in the Linux CI environment. This is intentional and does not affect the API functionality.
- Automatic Builds: Push or create PR to
main/developbranches - Manual Builds: Use "Actions" tab → "Build Only" → "Run workflow"
- API-specific Builds: Automatically triggered when API-related files change
- Infrastructure tests failing: Check SQL Server service health
- API Integration tests failing: Usually Docker-related, workflow continues
- Database project build errors: Expected and excluded from CI
To test the build locally:
dotnet restore
dotnet build src/WarehouseEngine.Api/WarehouseEngine.Api.csproj --configuration Release
dotnet test tests/WarehouseEngine.Domain.Tests/WarehouseEngine.Domain.Tests.csproj
dotnet publish src/WarehouseEngine.Api/WarehouseEngine.Api.csproj --output ./dist