Update android-dev-ci.yml #6
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 CI (dev) | |
| on: | |
| push: | |
| branches: [ "dev" ] | |
| pull_request: | |
| branches: [ "dev" ] | |
| jobs: | |
| dev-ci: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Decode google-services.json | |
| env: | |
| GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }} | |
| run: | | |
| echo "Decoding google-services.json..." | |
| echo $GOOGLE_SERVICES_JSON_BASE64 | base64 --decode > app/google-services.json | |
| echo "google-services.json created successfully." | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x ./gradlew | |
| - name: Clean project | |
| run: ./gradlew clean | |
| - name: Run Android Lint | |
| run: ./gradlew lint | |
| - name: Run Unit Tests | |
| run: ./gradlew testDebugUnitTest | |
| - name: Run Android Instrumentation Tests | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: 30 | |
| target: google_apis | |
| arch: x86_64 | |
| profile: pixel_3 | |
| script: ./gradlew connectedDebugAndroidTest | |
| - name: Build APKs | |
| run: ./gradlew assembleDebug assembleRelease |