A modern Android application built with Kotlin and Jetpack Compose, featuring a comprehensive CI/CD pipeline with automated testing, code quality checks, and release management.
- Modern Kotlin/Compose UI
- Counter functionality with ViewModel
- Comprehensive unit tests
- Automated CI/CD with GitHub Actions
- Code formatting and quality checks
- Test coverage reporting
- Security scanning
- Automated releases
- GITHUB_CI_CD.md - Complete guide to GitHub Actions workflows and CI/CD infrastructure
- CI_CD_GUIDE.md - Detailed guide for local development and troubleshooting
See GITHUB_CI_CD.md for:
- Workflow descriptions
- How to trigger releases
- Where to view results
- Security scanning details
- Troubleshooting guide
This project uses GitHub Actions for comprehensive continuous integration and deployment.
| Workflow | Trigger | Purpose |
|---|---|---|
| Android CI/CD | Push/PR to main | Build, test, format check, coverage |
| Security Scan | Push/PR/Daily | Vulnerability scanning with Trivy |
| Lint & Analysis | Push/PR | Code quality and Android Lint |
| Release Build | Version tags (v*) | Release APK creation |
# Format and test locally
./gradlew spotlessApply test
# Push to trigger CI/CD
git push origin main
# Create a release
git tag v1.0.0
git push origin v1.0.0- Ensures consistent Kotlin code style
- Uses ktlint formatter
- Integrated in all workflows
- Local commands:
./gradlew spotlessApply # Auto-fix formatting ./gradlew spotlessCheck # Check without fixing
- Measures code coverage per test run
- Generates HTML reports
- Local command:
./gradlew jacocoTestReport
- Static analysis for Android issues
- Runs automatically in CI
- Local command:
./gradlew lint
app/src/
├── main/
│ └── java/com/refactoring/excercise/
│ ├── MainActivity.kt # Main UI with Compose
│ ├── CounterViewModel.kt # Counter business logic
│ └── ui/theme/ # Theme configuration
└── test/
└── java/com/refactoring/excercise/
└── CounterViewModelTest.kt # Unit tests
Before pushing your changes:
# Format code
./gradlew spotlessApply
# Run tests
./gradlew test
# Check code quality
./gradlew spotlessCheck lint
# Generate coverage report
./gradlew jacocoTestReport
# Build debug APK
./gradlew assembleDebugFor comprehensive information about the CI/CD infrastructure, see:
-
GITHUB_CI_CD.md - Main documentation
- All workflow explanations
- How to trigger each workflow
- Where to view results
- Troubleshooting
-
CI_CD_GUIDE.md - Developer guide
- Local setup instructions
- Common workflows
- Code quality tool details
- Future enhancements
git tag v1.0.0
git push origin v1.0.0
# Automated release build starts
# Download APK from GitHub Releases- Trivy vulnerability scanner runs on every push
- Results available in GitHub Security tab
- Daily automated scans scheduled
See GITHUB_CI_CD.md - Troubleshooting for common issues and solutions.
For deployment to Google Play or other stores, see future enhancements in GITHUB_CI_CD.md.