Problem: ((excluded_count++)) was causing bash errors
Solution: Changed to excluded_count=$((excluded_count + 1))
Problem: Test failures weren't properly reported (exit code 1) Solution: Added proper error handling and exit codes
π Searching for test projects: ./conferenti-api/test/**/*Tests*csproj
Found:
β
./conferenti-api/test/Conferenti.Api.Tests.Functional/Conferenti.Api.Tests.Functional.csproj
β
./conferenti-api/test/Conferenti.Application.Tests.Unit/Conferenti.Application.Tests.Unit.csproj
β
./conferenti-api/test/Conferenti.Domain.Tests.Unit/Conferenti.Domain.Tests.Unit.csproj
β
./conferenti-api/test/Conferenti.Infrastructure.Tests.Unit/Conferenti.Infrastructure.Tests.Unit.csproj
π« ./conferenti-api/test/Conferenti.Api.Tests.Integration/Conferenti.Api.Tests.Integration.csproj
Filtered: (1 excluded)
π¦ Conferenti.Api.Tests.Functional
π¦ Conferenti.Application.Tests.Unit
π¦ Conferenti.Domain.Tests.Unit
π¦ Conferenti.Infrastructure.Tests.Unit
π§ͺ Running tests: ./conferenti-api/test/Conferenti.Api.Tests.Functional/...
[test output]
β
Tests passed for: ./conferenti-api/test/Conferenti.Api.Tests.Functional/...
π§ͺ Running tests: ./conferenti-api/test/Conferenti.Application.Tests.Unit/...
[test output]
β
Tests passed for: ./conferenti-api/test/Conferenti.Application.Tests.Unit/...
[... continues for all projects ...]
π All unit tests passed successfully!
π§ͺ Running tests: ./conferenti-api/test/Conferenti.Domain.Tests.Unit/...
[test output with failures]
β Tests failed for: ./conferenti-api/test/Conferenti.Domain.Tests.Unit/...
β One or more test projects failed
Error: Process completed with exit code 1
| Issue | Before | After |
|---|---|---|
| Counter increment | ((excluded_count++)) - could error |
excluded_count=$((excluded_count + 1)) - safe |
| Test failures | Continued silently | Tracked and reported |
| Exit codes | Inconsistent | Proper exit 1 on failure |
| Logging | Basic | Shows pass/fail per project |
- β Integration tests excluded
- β Each unit test project runs
- β Success message shown
- β Exit code 0
- β Integration tests excluded
- β All projects tested (doesn't stop early)
- β Failure reported clearly
- β Exit code 1
- π« All projects excluded
β οΈ Warning message shown- β Exit code 0 (not a failure)
The unit test action now properly handles errors and provides clear feedback! π