This repository uses GitHub Actions for continuous integration and deployment.
Runs on every push and pull request to main and develop branches.
Jobs:
-
Edge Gateway Tests
- Go 1.21+ tests with race detection
- Coverage reporting
- Runs:
go test -v -race -coverprofile=coverage.out ./...
-
Node.js Services Tests (Matrix strategy)
- Tests all services: auth, channel, analytics, feature-flags
- Node.js 20+ with npm caching
- Coverage for each service
- Runs:
npm test -- --coverage
-
Code Quality
- Go formatting check (
go fmt) - Go vet analysis
- Node.js dependency validation
- Go formatting check (
-
Build Check
- Docker image builds (no push)
- Validates Dockerfiles
- Ensures deployment readiness
-
Status Check
- Final gate for all jobs
- Reports overall pass/fail
Badges are configured for the srota-protocol organization:
[](https://github.com/srota-protocol/srota/actions)Repository: https://github.com/srota-protocol/srota
Before pushing, run tests locally:
# Go tests
cd edge-gateway && go test -v ./...
# Node.js tests
cd services/auth-service && npm test
cd services/channel-service && npm test
cd services/analytics-service && npm test
cd services/feature-flags-service && npm testCoverage is uploaded to Codecov (optional). To enable:
- Sign up at codecov.io
- Add repository
- No additional configuration needed - workflow already includes upload steps
None currently. Add these if deploying:
DOCKER_USERNAME- Docker Hub usernameDOCKER_PASSWORD- Docker Hub tokenKUBECONFIG- Kubernetes config (for deployments)
Recommended branch protection rules for main:
- ✅ Require pull request reviews (1 approver)
- ✅ Require status checks: "All Tests Passed"
- ✅ Require branches to be up to date
- ✅ Include administrators
Tests fail locally but pass in CI:
- Check Node.js/Go versions match
- Verify npm package-lock.json is committed
- Clear caches:
go clean -cache,npm clean-install
Docker build fails:
- Test locally:
docker build -f edge-gateway/Dockerfile . - Check Dockerfile paths are relative to repo root
Coverage not uploading:
- Codecov token not required for public repos
- Private repos need
CODECOV_TOKENsecret