Development¶
Prerequisites¶
- Go 1.26.0+
- Task (task runner)
- Dagger (CI/CD engine)
- pre-commit
- Docker (for Redis integration tests)
Setup¶
git clone https://github.com/stuttgart-things/homerun-library.git
cd homerun-library
go mod download
pre-commit install
Running Tests¶
Unit tests (no Redis required)¶
Integration tests via Dagger (starts Redis automatically)¶
All tests with report¶
Manual Redis for local integration testing¶
docker run -d --name redis-stack-server \
-p 6379:6379 \
-e REDIS_ARGS="--requirepass mypassword" \
redis/redis-stack-server:7.2.0-v18
export REDIS_PASSWORD=mypassword
go run tests/pitcher/pitch_message.go
Linting¶
CI/CD¶
The project uses two GitHub Actions workflows:
| Workflow | Trigger | Purpose |
|---|---|---|
dagger-static-checks.yaml |
push, PR | Dagger-based static analysis (lint + unit tests) |
dagger-tests.yaml |
push, PR | Dagger-based integration tests with Redis |
Release¶
Releases follow semantic-release with the Angular commit convention:
feat:- minor version bumpfix:- patch version bumpfeat!:orBREAKING CHANGE:- major version bump
Branch Strategy¶
main- production branchfeature/**- new featuresfix/**- bug fixes