mirror of
https://github.com/Matte23/circolapp.git
synced 2025-12-06 07:29:10 +00:00
Add Android Lint to Github Actions
This commit is contained in:
36
.github/workflows/ci.yml
vendored
36
.github/workflows/ci.yml
vendored
@@ -1,7 +1,5 @@
|
||||
name: Android CI
|
||||
|
||||
# Controls when the action will run. Triggers the workflow on push or pull request
|
||||
# events but only for the master branch
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
@@ -10,11 +8,9 @@ on:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
# The type of runner that the job will run on
|
||||
name: Run Unit Tests
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup Java JDK
|
||||
@@ -22,9 +18,33 @@ jobs:
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Unit tests
|
||||
run: bash ./gradlew test --stacktrace
|
||||
- name: Kotlin Linter
|
||||
uses: vroy/gha-kotlin-linter@v2
|
||||
run: bash ./gradlew test
|
||||
|
||||
lint:
|
||||
name: Run Android Lint
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup Java JDK
|
||||
uses: actions/setup-java@v1.4.2
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Run Android Lint
|
||||
run: bash ./gradlew lint
|
||||
|
||||
ktlint:
|
||||
name: Run Kotlin Lint
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup Java JDK
|
||||
uses: actions/setup-java@v1.4.2
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Run Kotlin Lint
|
||||
run: bash ./gradlew ktlintCheck
|
||||
|
||||
apk:
|
||||
name: Generate APK
|
||||
@@ -37,7 +57,7 @@ jobs:
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Build debug APK
|
||||
run: bash ./gradlew assembleDebug --stacktrace
|
||||
run: bash ./gradlew assembleDebug
|
||||
- name: Upload APK
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
|
||||
@@ -6,12 +6,15 @@ buildscript {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
|
||||
maven {
|
||||
url "https://plugins.gradle.org/m2/"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.0.1'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:$about_libs_version"
|
||||
classpath "org.jlleitschuh.gradle:ktlint-gradle:9.4.0"
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
}
|
||||
@@ -21,8 +24,9 @@ allprojects {
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
|
||||
}
|
||||
|
||||
apply plugin: "org.jlleitschuh.gradle.ktlint"
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
|
||||
Reference in New Issue
Block a user