This file contains 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: Test App | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build_and_test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Setup Android environment | |
uses: android-actions/setup-android@v3 | |
- name: Decode Keystore | |
uses: timheuer/[email protected] | |
id: android_keystore | |
with: | |
fileName: "android_keystore.jks" | |
encodedString: ${{ secrets.KEYSTORE_BASE64 }} | |
- name: Build APK | |
run: | | |
chmod 755 gradlew | |
./gradlew clean assembleRelease \ | |
-Pandroid.injected.signing.store.file=${{ steps.android_keystore.outputs.filePath }} \ | |
-Pandroid.injected.signing.store.password=${{ secrets.KEYSTORE_PASSWORD }} \ | |
-Pandroid.injected.signing.key.alias=${{ secrets.KEY_ALIAS }} \ | |
-Pandroid.injected.signing.key.password=${{ secrets.KEY_PASSWORD }} | |
- name: Run Unit Tests | |
run: ./gradlew test | |
- name: Run Instrumentation Tests | |
run: ./gradlew connectedAndroidTest | |
- name: Run Lint | |
run: ./gradlew lint | |
security: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up CodeQL | |
uses: github/codeql-action/setup@v2 | |
- name: Analyze code | |
uses: github/codeql-action/analyze@v2 |