Skip to content

Instantly share code, notes, and snippets.

@silmood
Last active June 30, 2018 20:13
Show Gist options
  • Select an option

  • Save silmood/dc2f8c0d6f4009d36494eeac0b84c954 to your computer and use it in GitHub Desktop.

Select an option

Save silmood/dc2f8c0d6f4009d36494eeac0b84c954 to your computer and use it in GitHub Desktop.
Simple CircleCI Android Configuration
# Versión de CircleCI
version: 2
# Pipeline de ejecución
jobs:
build:
working_directory: ~/code
# Imagen de Docker en donde se ejecutarán nuestras pruebas
docker:
- image: circleci/android:api-25-alpha
environment:
JVM_OPTS: -Xmx3200m
steps:
# Checkout de nuestro código
- checkout
# Revisar si hay cambios en el archivo build.gradle
- restore_cache:
key: jars-{{ checksum "build.gradle"}}-{{ checksum "app/build.gradle" }}
# Descargar dependencias si es necesario
- run:
name: Download Dependencies
command: ./gradlew androidDependencies
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
# Ejecutar pruebas y generar reportes
- run:
name: Run Tests
command: ./gradlew lint test
- store_artifacts:
path: app/build/reports
destination: reports
- store_test_results:
path: app/build/test-results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment