diff options
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/android.yml | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml new file mode 100644 index 0000000..35aabeb --- /dev/null +++ b/.github/workflows/android.yml @@ -0,0 +1,58 @@ +name: Android Widget + +on: + push: + paths: + - 'android/**' + pull_request: + paths: + - 'android/**' + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Install Gradle 8.6 + run: | + wget -q https://services.gradle.org/distributions/gradle-8.6-bin.zip -O /tmp/gradle.zip + sudo unzip -q /tmp/gradle.zip -d /opt/gradle + + - name: Cache Gradle dependencies + uses: actions/cache@v4 + with: + path: ~/.gradle/caches + key: ${{ runner.os }}-gradle-${{ hashFiles('android/**/*.gradle.kts') }} + restore-keys: | + ${{ runner.os }}-gradle- + + - name: Run unit tests + working-directory: android + run: ./gradlew :app:testDebugUnitTest + + - name: Upload test report + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-report + path: android/app/build/reports/tests/ + + - name: Build debug APK + working-directory: android + run: ./gradlew :app:assembleDebug + + - name: Upload APK + uses: actions/upload-artifact@v4 + with: + name: doot-widget-debug + path: android/app/build/outputs/apk/debug/app-debug.apk + retention-days: 30 |
