Skip to content

Protocol-agnostic link platform for modern apps. Route HTTP, IoT, Web3 & deep links with <5ms latency. Zero-knowledge privacy, context-aware switching.

License

Notifications You must be signed in to change notification settings

srota-protocol/srota

 
 

Repository files navigation

GitHub Actions CI/CD

This repository uses GitHub Actions for continuous integration and deployment.

Workflows

CI Pipeline (.github/workflows/ci.yml)

Runs on every push and pull request to main and develop branches.

Jobs:

  1. Edge Gateway Tests

    • Go 1.21+ tests with race detection
    • Coverage reporting
    • Runs: go test -v -race -coverprofile=coverage.out ./...
  2. 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
  3. Code Quality

    • Go formatting check (go fmt)
    • Go vet analysis
    • Node.js dependency validation
  4. Build Check

    • Docker image builds (no push)
    • Validates Dockerfiles
    • Ensures deployment readiness
  5. Status Check

    • Final gate for all jobs
    • Reports overall pass/fail

Status Badges

Badges are configured for the srota-protocol organization:

[![CI](https://github.com/srota-protocol/srota/workflows/CI/badge.svg)](https://github.com/srota-protocol/srota/actions)

Repository: https://github.com/srota-protocol/srota

Local Testing

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 test

Coverage Reports

Coverage is uploaded to Codecov (optional). To enable:

  1. Sign up at codecov.io
  2. Add repository
  3. No additional configuration needed - workflow already includes upload steps

Secrets Required

None currently. Add these if deploying:

  • DOCKER_USERNAME - Docker Hub username
  • DOCKER_PASSWORD - Docker Hub token
  • KUBECONFIG - Kubernetes config (for deployments)

Branch Protection

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

Troubleshooting

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_TOKEN secret

About

Protocol-agnostic link platform for modern apps. Route HTTP, IoT, Web3 & deep links with <5ms latency. Zero-knowledge privacy, context-aware switching.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published