- Fix race condition in gateway tests by using TestMain to set Gin mode once
- Remove duplicate gin.SetMode(gin.TestMode) calls from individual tests
- Add TestMain function to initialize test environment before all tests
- Prevents race conditions when tests run in parallel with -race flag
- Update golangci-lint-action from v6 to v7
- v6 doesn't support golangci-lint v2.x versions
- v7 supports golangci-lint v2.x and automatically selects compatible version
- Change version from v2.6.0 to latest for automatic compatibility
All tests now pass with race detector enabled.
- Replace manual golangci-lint v2.1.6 installation (built with Go 1.24)
- Use official golangci/golangci-lint-action@v6 GitHub Action
- Set version to v2.6.0 which supports Go 1.25+
- Action automatically handles Go version compatibility
Fixes CI error: 'the Go language version (go1.24) used to build
golangci-lint is lower than the targeted Go version (1.25.3)'
- Create ADR-0034 documenting Go version upgrade to 1.25.3
- Mark ADR-0002 as superseded by ADR-0034
- Update CI workflow to use Go 1.25.3
- Update Makefile to build both platform and api-gateway binaries
- Update CI workflow to build and upload both binaries
- Update documentation (ADR README and mkdocs.yml) to include ADR-0034
Install v2.1.6 manually in CI (not via action) to avoid --out-format flag
compatibility issues. This ensures both local and CI use the same version
and support version: 2 config format.
The golangci-lint-action has compatibility issues with v2.1.6 (uses
--out-format flag which v2 doesn't support). Install golangci-lint manually
to avoid action limitations and remove version field from config to be
compatible with CI v1.64.8. Local v2.x will work but may show warnings.
The golangci-lint-action doesn't properly support v2.1.6 (uses --out-format
flag which v2 doesn't support). Remove version: 2 from config to make it
compatible with CI v1.64.8. Local v2.x will still work but may show a
deprecation warning about the config format.
v3 action uses --out-format flag which v2.1.6 doesn't support.
Upgrade to v4 action which should properly support golangci-lint v2.
This should resolve the 'unknown flag: --out-format' error.
'latest' resolves to v1.64.8 which doesn't support version: 2 config.
Pin to v2.1.6 to match local development environment and ensure
v2 config compatibility.
v1.65.0 doesn't exist. Use 'latest' to automatically get a version
that supports v2 config format (version: 2). This should work with
both local v2.1.6 and CI.
v1.64.8 doesn't support version: 2 in config files.
Upgrade to v1.65.0 which supports v2 config format.
This ensures compatibility with local v2.1.6 and CI.
- Add version: 2 to .golangci.yml for local golangci-lint v2.1.6 compatibility
- Pin CI to use golangci-lint v1.64.8 explicitly (should support v2 config)
This ensures the config works both locally (v2.1.6) and in CI (v1.64.8).
If v1.64.8 doesn't support v2 config, we may need to upgrade CI to v2.
Downgrade golangci-lint-action from v4 to v3 to match other actions
that were downgraded for Gitea compatibility (upload-artifact, codecov).
v4 actions are not fully supported on Gitea/GHES.
The golangci-lint-action tries to use tar with --posix option for caching,
but BusyBox tar (used in Alpine-based runners) doesn't support this option.
Skipping the cache avoids this compatibility issue.
- Improve test file detection with more robust find command
- Use explicit variable assignment instead of pipe to grep
- Add debug output to show found test files
- Handle errors gracefully with 2>/dev/null || true
- Downgrade actions for Gitea compatibility
- upload-artifact@v4 -> v3 (Gitea doesn't support v4+)
- codecov-action@v4 -> v3 (preventive downgrade)
- Add Alpine Linux build dependencies installation step
- Install build-base and musl-dev when running on Alpine
- Required for CGO-enabled builds and race detector
- Disable CGO for verify build step when no tests exist
- Avoids requiring C build tools for simple compilation check
- Add tests for internal/config package (90.9% coverage)
- Test all viperConfig getter methods
- Test LoadConfig with default and environment-specific configs
- Test error handling for missing config files
- Add tests for internal/di package (88.1% coverage)
- Test Container lifecycle (NewContainer, Start, Stop)
- Test providers (ProvideConfig, ProvideLogger, CoreModule)
- Test lifecycle hooks registration
- Include mock implementations for testing
- Add tests for internal/logger package (96.5% coverage)
- Test zapLogger with JSON and console formats
- Test all logging levels and methods
- Test middleware (RequestIDMiddleware, LoggingMiddleware)
- Test context helper functions
- Include benchmark tests
- Update CI workflow to skip tests when no test files exist
- Add conditional test execution based on test file presence
- Add timeout for test execution
- Verify build when no tests are present
All tests follow Go best practices with table-driven patterns,
parallel execution where safe, and comprehensive coverage.
Implemented all 5 stories from Epic 0:
Story 0.1: Project Initialization
- Initialize Go module with path git.dcentral.systems/toolz/goplt
- Create complete directory structure (cmd/, internal/, pkg/, modules/, config/, etc.)
- Add comprehensive .gitignore for Go projects
- Create README.md with project overview and setup instructions
Story 0.2: Configuration Management System
- Define ConfigProvider interface in pkg/config
- Implement Viper-based configuration in internal/config
- Create configuration loader with environment support
- Add default, development, and production YAML config files
Story 0.3: Structured Logging System
- Define Logger interface in pkg/logger
- Implement Zap-based logger in internal/logger
- Add request ID middleware for Gin
- Create global logger export with convenience functions
- Support context-aware logging with request/user ID extraction
Story 0.4: CI/CD Pipeline
- Create GitHub Actions workflow for CI (test, lint, build, fmt)
- Add comprehensive Makefile with development commands
- Configure golangci-lint with reasonable defaults
Story 0.5: Dependency Injection and Bootstrap
- Create FX-based DI container in internal/di
- Implement provider functions for Config and Logger
- Create application entry point in cmd/platform/main.go
- Add lifecycle management with graceful shutdown
All acceptance criteria met:
- go build ./cmd/platform succeeds
- go test ./... runs successfully
- go mod verify passes
- Config loads from config/default.yaml
- Logger can be injected and used
- Application starts and shuts down gracefully