Feat: Major Enhancements, Refactoring, and Test Coverage #19
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Android Build CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| # Optional, but good security practice | |
| - name: 📝 Validate Gradle wrapper | |
| uses: gradle/wrapper-validation-action@v3 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: 🛡️ Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| - name: 🔧 Setup Gradle (Caching & Optimization) | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: 🏗️ Build debug APK | |
| run: ./gradlew assembleDebug --stacktrace | |
| - name: Check if there is any build errors | |
| run: | | |
| if grep -q "BUILD FAILED" build/outputs/logs/*.txt; then | |
| echo "Build failed with errors!" | |
| exit 1 | |
| else | |
| echo "Build successful with no errors." | |
| fi |