The original make infra-test-ci command (which ran infrastructure/tests/test-ci.sh) was
mixing concerns across the three project layers:
- Infrastructure layer -
infrastructure/folder - Application layer -
application/folder - Project/Global layer - Cross-cutting concerns
The infrastructure/tests/test-ci.sh script was calling make lint (a global command) and
performing other project-wide validations, violating the separation of concerns.
Implemented proper three-layer separation for CI testing:
- Script:
tests/test-ci.sh - Purpose: Global/cross-cutting concerns that span all layers
- Responsibilities:
- Global syntax validation (
./scripts/lint.sh) - Project structure validation
- Makefile validation
- Orchestrates infrastructure and application layer tests
- Global syntax validation (
- Script:
infrastructure/tests/test-ci.sh(refactored) - Purpose: Infrastructure-specific validation only
- Responsibilities:
- Terraform/OpenTofu syntax validation
- Cloud-init template validation
- Infrastructure script validation
- Infrastructure configuration validation
- Script:
application/tests/test-ci.sh(new) - Purpose: Application-specific validation only
- Responsibilities:
- Docker Compose syntax validation
- Application configuration validation
- Deployment script validation
- Grafana dashboard validation
make test-ci (Project-wide orchestrator)
├── Global concerns (syntax, structure, Makefile)
├── make infra-test-ci (Infrastructure layer only)
└── make app-test-ci (Application layer only)
Updated .github/workflows/testing.yml to use make test-ci instead of make infra-test-ci,
ensuring all three layers are properly tested in the correct order.
- Clear separation of concerns - Each layer only tests its own responsibilities
- Parallel development - Teams can work on different layers independently
- Focused testing - Developers can test specific layers without running global tests
- Maintainable - Changes to one layer don't affect tests for other layers
- CI efficiency - Better organization of test output and failure isolation
| Command | Purpose | Scope |
|---|---|---|
make test-ci |
Complete CI validation | All layers (orchestrator) |
make infra-test-ci |
Infrastructure validation only | Infrastructure layer |
make app-test-ci |
Application validation only | Application layer |
make lint |
Global syntax validation | Project-wide |
This change ensures that GitHub runners (which don't support virtualization) can properly validate all project concerns without attempting infrastructure deployment while maintaining clear architectural boundaries.