Created
June 13, 2020 10:23
-
-
Save Barros9/642362f76896a168f95763c219a6238f to your computer and use it in GitHub Desktop.
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: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
clean: | |
name: Clean | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Repo | |
uses: actions/checkout@v2 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Change wrapper permissions | |
run: chmod +x ./gradlew | |
- name: Clean | |
run: ./gradlew clean | |
lintCheck: | |
name: Run lint check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Repo | |
uses: actions/checkout@v2 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Change wrapper permissions | |
run: chmod +x ./gradlew | |
- name: Run Kotlin Linter | |
run: ./gradlew ktlintCheck | |
- name: Run Android Linter | |
run: ./gradlew lint | |
unitTest: | |
name: Run unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Repo | |
uses: actions/checkout@v2 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Change wrapper permissions | |
run: chmod +x ./gradlew | |
- name: Run Unit Tests | |
run: ./gradlew testStagingDebugUnitTest | |
apk: | |
name: Generate APK | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Repo | |
uses: actions/checkout@v2 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Change wrapper permissions | |
run: chmod +x ./gradlew | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Build Debug APK | |
run: ./gradlew assembleDebug | |
- name: Upload APK | |
uses: actions/upload-artifact@v1 | |
with: | |
name: app | |
path: app/build/outputs/apk/debug/app-debug.apk |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment