Kotlin based Gradle Scripts #65
Workflow file for this run
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: pull_request | |
jobs: | |
build-and-test: | |
name: Build, run tests and upload test reports | |
runs-on: macos-latest | |
steps: | |
- name: Checkout current repository in macos' file system | |
uses: actions/checkout@v3 | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'corretto' | |
cache: 'gradle' | |
- name: ktlint check | |
run: ./gradlew ktlintCheck | |
- name: Unit tests | |
run: ./gradlew testDebugUnitTest --stacktrace | |
- name: Upload Reports | |
uses: actions/upload-artifact@v3 | |
with: | |
name: reports | |
path: app/build/reports | |
generate-apk: | |
name: Generate and upload debug apk | |
runs-on: ubuntu-latest | |
needs: | |
- build-and-test | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'corretto' | |
cache: 'gradle' | |
- name: Generate debug apk | |
run: ./gradlew assembleDebug | |
- name: Upload apk | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-output | |
path: app/build/outputs/apk/debug/app-debug.apk | |