Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Add] Circle CI config #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
version: 2.1
jobs:
build:
working_directory: ~/AndroidSetup
docker:
- image: circleci/android:api-28
environment:
GRADLE_OPTS: -Xmx4g -Dorg.gradle.daemon=false
JVM_OPTS: -Xmx4g
steps:
- checkout
- restore_cache:
key: gradle-{{ checksum "build.gradle.kts" }}-{{ checksum "buildSrc/src/main/kotlin/Config.kt" }}-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}-{{ checksum "app/build.gradle.kts" }}
- run:
name: Download Dependencies
command: ./gradlew androidDependencies
- save_cache:
paths:
- ~/.gradle
key: gradle-{{ checksum "build.gradle.kts" }}-{{ checksum "buildSrc/src/main/kotlin/Config.kt" }}-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}-{{ checksum "app/build.gradle.kts" }}
- run:
name: Run Detekt
command: ./gradlew detekt
- run:
name: Run Ktlint
command: ./gradlew ktlintCheck
- run:
name: Run UnitTest
command: ./gradlew testDebugUnitTest
- run:
name: Save UnitTest results
command: |
mkdir -p ~/test-results/junit/
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/junit/ \;
when: always
- store_test_results:
path: ~/test-results
- store_artifacts:
path: app/build/reports
destination: reports