KompKit uses GitHub Actions for continuous integration with separate workflows optimized for our monorepo structure. Each workflow targets specific platforms to minimize build times and resource usage.
| Workflow | Status | Platform | Triggers | Path Filters |
|---|---|---|---|---|
| Web CI | ✅ Active | TypeScript/Node.js | develop, release |
packages/core/web/** |
| Kotlin CI | ✅ Active | Kotlin JVM | develop, release |
packages/core/android/** |
| Flutter CI | ✅ Active | Dart/Flutter | develop, release |
packages/core/flutter/** |
Purpose: Build, test, and validate TypeScript/JavaScript packages
Triggers:
- Push/PR to
releaseordevelopbranches - Changes in
packages/core/web/** - Changes in
.github/workflows/web.yml - Manual dispatch (
workflow_dispatch)
Jobs:
- web: Lint, typecheck, build, test, and generate documentation
- Node.js 20.x with npm caching
- Lerna-based monorepo management
- TypeDoc documentation generation
- Artifact uploads (build outputs, docs)
Path Filters: Optimized to run only when web-related files change
Purpose: Build, test, and validate Kotlin JVM packages
Triggers:
- Push/PR to
releaseordevelopbranches - Changes in
packages/core/android/** - Changes in
.github/workflows/android.yml - Manual dispatch (
workflow_dispatch)
Jobs:
- kotlin: Lint, static analysis, build, test, and generate documentation
- JDK 17 (Temurin distribution)
- Gradle build with caching
- ktlint code formatting validation
- detekt static analysis
- Dokka documentation generation
- JAR artifact uploads
Path Filters: Optimized to run only when Kotlin-related files change
Purpose: Build, test, and validate Dart/Flutter packages
Triggers:
- Push/PR to
releaseordevelopbranches - Changes in
packages/core/flutter/** - Changes in
.github/workflows/flutter.yml - Manual dispatch (
workflow_dispatch)
Jobs:
- flutter: Analyze, test, and generate documentation
- Flutter 3.24.0 (stable channel)
flutter analyzefor static analysisflutter test --coveragewith coverage reporting- Codecov integration for coverage uploads
- DartDoc documentation generation
- Artifact uploads (docs)
Path Filters: Optimized to run only when Flutter-related files change
| Action | Version | Purpose | Used In |
|---|---|---|---|
actions/checkout |
v4 | Repository checkout | All workflows |
actions/setup-node |
v4 | Node.js 20.x setup | Web CI |
actions/setup-java |
v4 | JDK 17 setup | Kotlin CI |
gradle/actions/setup-gradle |
v4 | Gradle with caching | Kotlin CI |
subosito/flutter-action |
v2 | Flutter setup | Flutter CI |
codecov/codecov-action |
v5 | Coverage upload | Flutter CI |
actions/upload-artifact |
v4 | Artifact storage | All workflows |
| Platform | Requirements | Version |
|---|---|---|
| Web | Node.js | 20.x |
| Web | npm | Latest |
| Web | TypeScript | 5.7+ |
| Kotlin | JDK | 17 (Temurin) |
| Kotlin | Kotlin | 2.3.0 |
| Kotlin | Gradle | 8.5 |
| Flutter | Flutter | 3.27.4 |
| Flutter | Dart | 3.0+ |
Minimal Permissions:
contents: read- Repository accesspull-requests: read- PR information access
No Secrets Required: All builds use public dependencies and tools.
# Install dependencies
npm ci
# Build packages (using Lerna)
npm run build
# Run tests
npm run test:web
# Generate docs
npm run docs:web# Navigate to Kotlin module
cd packages/core/android
# Make gradlew executable (if needed)
chmod +x gradlew
# Clean build
./gradlew clean
# Lint with ktlint
./gradlew ktlintCheck
# Static analysis with detekt
./gradlew detekt
# Build JAR
./gradlew assemble
# Run unit tests
./gradlew test
# Generate documentation
./gradlew dokkaHtml- Node.js: Native npm cache via
actions/setup-node - Gradle: Build cache via
gradle/actions/setup-gradle - No manual caching: Avoids cache conflicts and complexity
web-docs-{run_id}: Generated TypeDoc documentation (30 days)web-build-{run_id}: Built packages from dist/ directories (7 days)
android-test-reports-{run_id}: JUnit test reports (7 days)android-lint-reports-{run_id}: ktlint and detekt reports (7 days)kotlin-jar-{run_id}: Built JAR files (7 days)kotlin-docs-{run_id}: Dokka-generated documentation (30 days)
flutter-docs-{run_id}: DartDoc-generated documentation (30 days)
Use commit message flags to skip specific builds:
[skip web]: Skip web CI workflow[skip android]: Skip Kotlin CI workflow[skip flutter]: Skip Flutter CI workflow
1. Gradle Permission Denied
chmod +x packages/core/android/gradlew
git add packages/core/android/gradlew
git commit -m "fix: make gradlew executable"2. Node.js Build Failures
- Check Node.js version compatibility (using 20.x)
- Verify
package-lock.jsonis committed - Clear npm cache:
npm ci --cache .npm --prefer-offline
3. Kotlin Build Failures
- Verify JDK 17 compatibility
- Check Kotlin version compatibility (2.3.0)
- Review ktlint/detekt reports for code quality issues
- Ensure Gradle wrapper is executable
4. Path Filters Not Working
- Ensure file changes match the path patterns in workflow triggers
- Check that both
pushandpull_requestevents have same path filters
Check workflow status:
# View recent workflow runs
gh run list --limit 10
# View specific run details
gh run view <run-id>
# Download artifacts
gh run download <run-id>Local debugging:
# Simulate CI environment
export CI=true
export GITHUB_ACTIONS=true
# Run builds with same flags as CI
npm ci
npm run build --workspaces --if-present || npm run build
npm test --workspaces --if-present || npm test || echo "No tests found"- Web builds: < 5 minutes for typical changes
- Kotlin builds: < 8 minutes for typical changes
- First-time builds: May take longer due to dependency downloads
- Concurrent builds: Path filters prevent unnecessary parallel execution
- develop: Active development branch, all PRs target here
- release: Stable release branch, merges from develop
- Dependabot: Targets develop branch for dependency updates
Monitor CI health via:
- GitHub Actions dashboard
- README badges showing build status
- Artifact retention and storage usage
- Build time trends and performance metrics