Building & Testing
Complete guide to building ODE components from source and running tests.
Building from Source
Formulus
Build the React Native mobile application:
- Development Build
- Android Production
- iOS Production (macOS only)
cd formulus
npm install
npm run android # For Android
npm run ios # For iOS (macOS only)
cd formulus/android
./gradlew assembleRelease
APK will be in android/app/build/outputs/apk/release/
cd formulus/ios
xcodebuild -workspace Formulus.xcworkspace -scheme Formulus -configuration Release
Or build from Xcode:
- Open
Formulus.xcworkspacein Xcode - Select "Any iOS Device" or specific device
- Product → Archive
- Distribute App
Formplayer
Build the React web form renderer:
cd formulus-formplayer
npm install
npm run build
Build for React Native:
npm run build:rn
This builds and copies the output to the Formulus app.
Synkronus
Build the Go server:
cd synkronus
go build -o bin/synkronus cmd/synkronus/main.go
Cross-platform builds:
- Linux
- Windows
- macOS
GOOS=linux GOARCH=amd64 go build -o bin/synkronus-linux cmd/synkronus/main.go
$env:GOOS="windows"; $env:GOARCH="amd64"; go build -o bin/synkronus.exe cmd/synkronus/main.go
Or using bash (Git Bash/WSL):
GOOS=windows GOARCH=amd64 go build -o bin/synkronus.exe cmd/synkronus/main.go
GOOS=darwin GOARCH=amd64 go build -o bin/synkronus-macos cmd/synkronus/main.go
Synkronus CLI
Build the CLI:
cd synkronus-cli
go build -o bin/synk ./cmd/synkronus
Testing
Frontend Testing
Formulus
cd formulus
npm test
Runs Jest tests with React Native Testing Library.
Formplayer
cd formulus-formplayer
npm test
Runs Jest tests for React components.
Backend Testing
Synkronus
cd synkronus
go test ./...
Run all tests:
# With coverage
go test -cover ./...
# Verbose output
go test -v ./...
# Specific package
go test ./internal/handlers
Integration Tests
# Run integration tests (requires database)
go test -tags=integration ./...
End-to-End Testing
End-to-end testing infrastructure is under development. Current testing focuses on:
- Unit tests for individual components
- Integration tests for API endpoints
- Component tests for React components
E2E testing will be added as the testing infrastructure evolves.
Code Quality Checks
Linting
Frontend:
# Formulus
cd formulus
npm run lint
npm run lint:fix
# Formplayer
cd formulus-formplayer
npm run lint
npm run lint:fix
Backend:
# Synkronus
cd synkronus
golangci-lint run # If configured
Formatting
Frontend:
# Format code
npm run format
# Check formatting
npm run format:check
Backend:
# Format Go code
go fmt ./...
# Check with goimports
goimports -w .
CI/CD Pipeline
The project uses GitHub Actions for continuous integration:
Workflows
Synkronus Docker Build:
- Triggers on push to
mainor PRs affectingsynkronus/ - Builds Docker image
- Publishes to GitHub Container Registry
- Tags:
latest,v{version},{branch-name}
Frontend Quality Checks:
- Runs on all PRs
- Checks linting and formatting
- Runs tests
- Builds components
Local CI Simulation
Run CI checks locally:
# Frontend
cd formulus && npm run lint && npm run format:check && npm test
cd formulus-formplayer && npm run lint && npm run format:check && npm test
# Backend
cd synkronus && go test ./... && go fmt ./...
Docker Builds
Synkronus Docker Image
Build locally:
cd synkronus
docker build -t synkronus:local .
Multi-platform build:
docker buildx create --name multiplatform --use
docker buildx build --platform linux/amd64,linux/arm64 -t synkronus:local .
Release Process
Versioning
ODE follows semantic versioning (MAJOR.MINOR.PATCH):
- MAJOR: Breaking changes
- MINOR: New features (backward compatible)
- PATCH: Bug fixes (backward compatible)
Creating a Release
-
Update version numbers in:
package.json(frontend projects)versioninfo.json(Go projects)- Documentation
-
Create release branch:
git checkout -b release/v1.0.0
-
Update changelog
-
Create tag:
git tag -a v1.0.0 -m "Release version 1.0.0"
git push origin v1.0.0
- CI/CD will automatically:
- Build Docker images
- Publish to container registry
- Create GitHub release
Troubleshooting Build Issues
Node Modules Issues
# Clear and reinstall
rm -rf node_modules package-lock.json
npm install
Go Module Issues
# Clean module cache
go clean -modcache
go mod download
go mod tidy
Android Build Issues
# Clean Android build
cd android
./gradlew clean
cd ..
npm run android
iOS Build Issues
# Clean pods
cd ios
rm -rf Pods Podfile.lock
bundle exec pod install
cd ..
npm run ios