Last active
February 3, 2020 00:07
-
-
Save felipefpx/88a7a106220a4b5bde432da6c6dab41b to your computer and use it in GitHub Desktop.
config.yml for CircleCI
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
# Android Gradle CircleCI 2.0 configuration file | |
# Check https://circleci.com/docs/2.0/language-java/ for more details | |
# Suggestion: build the project by using ./gradlew lint test before using CircleCI | |
version: 2 | |
jobs: | |
build: | |
working_directory: ~/code | |
docker: | |
- image: circleci/android:api-25-alpha | |
resource_class: large | |
environment: | |
JVM_OPTS: -Xmx3200m | |
steps: | |
- checkout | |
# Project Dependencies and Caching | |
- restore_cache: | |
key: jars-{{ checksum "build.gradle" }}-{{ checksum "presentation/build.gradle" }} | |
- run: | |
name: Preparing project variables and signature requirements | |
command: source .circleci/projectSetup.sh && prepareRequiredInfo | |
- run: | |
name: Download Dependencies | |
command: ./gradlew androidDependencies | |
- save_cache: | |
paths: | |
- ~/.gradle | |
key: jars-{{ checksum "build.gradle" }}-{{ checksum "presentation/build.gradle" }} | |
# Run Lint: | |
- run: | |
name: Run lint | |
command: ./gradlew data:lintDebug domain:lintDebug presentation:lintDebug --stacktrace | |
# Build APK | |
# - run: | |
# name: Build APK (Debug) | |
# command: ./gradlew assembleDebug --stacktrace | |
# | |
# - run: | |
# name: Build APK (Release) | |
# command: ./gradlew assembleRelease --stacktrace | |
# | |
# - store_artifacts: | |
# path: presentation/build/outputs/apk | |
# destination: apk | |
# Unit Tests: | |
- run: | |
name: Run Unit Tests (Data layer) | |
command: ./gradlew data:testDebugUnitTest --stacktrace | |
- run: | |
name: Run Unit Tests (Domain layer) | |
command: ./gradlew domain:testDebugUnitTest --stacktrace | |
- run: | |
name: Run Unit Tests (Presentation Layer) | |
command: ./gradlew presentation:testDebugUnitTest --stacktrace | |
# Store reports (Data layer): | |
- store_artifacts: | |
path: data/build/reports/ | |
destination: reports/data/ | |
- store_test_results: | |
path: data/build/test-results | |
destination: tests/data/ | |
# Store reports (Domain layer): | |
- store_artifacts: | |
path: domain/build/reports/ | |
destination: reports/domain/ | |
- store_test_results: | |
path: domain/build/test-results | |
destination: tests/domain/ | |
# Store reports (Presentation layer): | |
- store_artifacts: | |
path: presentation/build/reports/ | |
destination: reports/presentation/ | |
- store_test_results: | |
path: presentation/build/test-results | |
destination: tests/presentation/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment