Skip to content

Update android_publish.yml #29

Update android_publish.yml

Update android_publish.yml #29

name: Android Validations
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
cache: gradle
- name: Cache Gradle and wrapper
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
- name: Compile the project
run: ./gradlew assembleDebug
- name: Run unit tests
run: ./gradlew test
- name: Store reports
if: failure()
uses: actions/upload-artifact@v3
with:
name: reports
path: |
**/build/reports/
**/build/test-results/
- name: Run KLint
run: ./gradlew ktlintCheck
- name: Run Detekt
run: ./gradlew detekt