03b9246afe
* Adds KTLint as a GitHub action * Adds KTLint to the gradle project for IDE integration * Adds .editorconfig to configure KTLint (android/)
46 lines
1.0 KiB
YAML
46 lines
1.0 KiB
YAML
name: Validate Android
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- '.github/workflows/validate-android.yml'
|
|
- 'android/**'
|
|
- '.editorconfig'
|
|
pull_request:
|
|
paths:
|
|
- '.github/workflows/validate-android.yml'
|
|
- 'android/**'
|
|
- '.editorconfig'
|
|
|
|
jobs:
|
|
lint:
|
|
name: Gradle Lint
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: ./android
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Setup JDK 1.8
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 1.8
|
|
- name: Setup node_modules
|
|
run: yarn --cwd ..
|
|
- name: Run Gradle Lint
|
|
run: ./gradlew lint
|
|
- uses: yutailang0119/action-android-lint@v1.0.2
|
|
with:
|
|
xml_path: android/build/reports/lint-results.xml
|
|
ktlint:
|
|
name: Kotlin Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Run KTLint
|
|
uses: mrousavy/action-ktlint@v1.6
|
|
with:
|
|
github_token: ${{ secrets.github_token }}
|