Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
AppIntro/.github/workflows/pre-merge.yml
View runs Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
110 lines (95 sloc)
2.47 KB
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: Pre Merge Checks | |
on: | |
push: | |
branches: | |
- 'master' | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
ktlint: | |
runs-on: [ubuntu-latest] | |
env: | |
GRADLE_OPTS: -Dorg.gradle.daemon=false | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Cache Gradle Folders | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches/ | |
~/.gradle/wrapper/ | |
key: cache-gradle | |
- name: Run ktlint | |
run: ./gradlew ktlintCheck | |
detekt: | |
runs-on: [ubuntu-latest] | |
env: | |
GRADLE_OPTS: -Dorg.gradle.daemon=false | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Cache Gradle Folders | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches/ | |
~/.gradle/wrapper/ | |
key: cache-gradle | |
- name: Run detekt | |
run: ./gradlew detekt | |
test: | |
runs-on: [ubuntu-latest] | |
env: | |
GRADLE_OPTS: -Dorg.gradle.daemon=false | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Cache Gradle Folders | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches/ | |
~/.gradle/wrapper/ | |
key: cache-gradle | |
- name: Run all the tests | |
run: ./gradlew test | |
build-debug-apk: | |
strategy: | |
fail-fast: false | |
matrix: | |
agp: [""] | |
kotlin: [""] | |
experimental: [false] | |
name: ["stable"] | |
include: | |
- agp: 4.2.+ | |
experimental: true | |
name: AGP-4.2.+ | |
- kotlin: 1.4.20+ | |
experimental: true | |
name: kotlin-EAP-1.4.20+ | |
runs-on: [ubuntu-latest] | |
continue-on-error: ${{ matrix.experimental }} | |
name: Build Debug APK - ${{ matrix.name }} - Experimental ${{ matrix.experimental }} | |
env: | |
GRADLE_OPTS: -Dorg.gradle.daemon=false | |
VERSION_AGP: ${{ matrix.agp }} | |
VERSION_KOTLIN: ${{ matrix.kotlin }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Cache Gradle Folders | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches/ | |
~/.gradle/wrapper/ | |
key: cache-gradle | |
- name: Build the Debug APK | |
run: ./gradlew assembleDebug | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: appintro-sample-app-${{ matrix.name }}.apk | |
path: example/build/outputs/apk/debug/example-debug.apk |