PR Validation
SLOzy uses GitHub Actions for CI/CD pipeline validation on every pull request targeting main or develop.
Pipeline Stages
PR Opened → Test → Security Scan → Build → Docker Build1. Test (go test)
yaml
go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...Runs all Go tests with race detection and coverage. Coverage is uploaded to Codecov.
2. Security Scan
- Gosec — Static analysis of Go source for security issues
- Trivy — Filesystem vulnerability scanning with SARIF output
3. Build
Compiles both binaries:
slozy-web— Main web applicationslozy-ingestor— Metrics ingestion service
A smoke test verifies the health endpoint (/health) after starting the binary.
4. Docker Build
Builds and pushes container images to GitHub Container Registry:
ghcr.io/{repo}/slozy-web:{tag}ghcr.io/{repo}/slozy-frontend:{tag}
Tagged with both latest and the commit SHA.
Branch Protection
PRs must pass all checks before merging. The pipeline enforces:
- All tests passing
- No critical security vulnerabilities
- Successful build
- Docker image compilation
Linting
Golangci-lint is configured but currently disabled (see if: false in CI). Enable by removing the conditional once golangci-lint v2 supports the project's Go version.