ci: add a circleci job to push the release build to playstore interna… #116
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: Android CI | |
on: [push] | |
jobs: | |
unit-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.0' | |
bundler-cache: true | |
- name: set up JDK 17 | |
uses: actions/setup-java@v1 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Cache Gradle wrapper | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/wrapper | |
key: ${{ runner.OS }}-gradle-wrapper-cache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.OS }}-gradle-wrapper-cache- | |
- name: Cache Gradle caches | |
uses: actions/cache@v3 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.OS }}-gradle-caches-cache-${{ hashFiles('build.gradle') }} | |
restore-keys: | | |
${{ runner.OS }}-gradle-caches-cache- | |
- name: generate ksProp file | |
run: ./gradlew generateKsPropFile | |
- name: generate google-services.json file | |
run: ./gradlew generateGoogleServicesJson | |
env: | |
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
- name: setup fastlane | |
run: bundle install | |
- name: run unit tests | |
run: bundle exec fastlane android run_unit_tests | |
- name: Unit tests results | |
uses: actions/upload-artifact@v1 | |
with: | |
name: unit-test-results | |
path: app/build/reports/tests/testDebugUnitTest/index.html | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v1 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: generate ksProp file | |
run: ./gradlew generateKsPropFile | |
- name: generate google-services.json file | |
run: ./gradlew generateGoogleServicesJson | |
env: | |
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
- name: Lint | |
run: bash ./gradlew lintDebug | |
- name: Lint results | |
uses: actions/upload-artifact@v1 | |
with: | |
name: app | |
path: app/build/reports/lint-results-debug.html | |
ui-test: | |
runs-on: macos-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v1 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: generate ksProp file | |
run: ./gradlew generateKsPropFile | |
- name: generate google-services.json file | |
run: ./gradlew generateGoogleServicesJson | |
env: | |
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }} | |
- name: run tests | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 29 | |
script: ./gradlew connectedCheck |