Am trying to generate a test coverage in the Circle CI with this file config.yml, but the build fails and it says No connected devices.
Below is the error generated on Circle CI :
And according to what I read Circle CI doesn't support Emulators currently.
Below is my config.yml file :
version: 2
jobs:
build:
working_directory: ~/ConvergeLevelApp
docker:
- image: circleci/android:api-25-alpha
environment:
JVM_OPTS: -Xmx3200m
CC_TEST_REPORTER_ID: 403xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ADB_INSTALL_TIMEOUT: 60
steps:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Download Dependencies
command: ./gradlew androidDependencies
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Setup Code Climate test-reporter
command: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
- run:
name: Run Tests
command: ./gradlew lint test
- store_artifacts:
path: app/build/reports
destination: reports
- store_test_results:
path: app/build/test-results
- run:
name: Generate JaCoCo report
command: ./gradlew jacocoTestReport
- run:
name: Upload coverage to code climate
command: |
export JACOCO_SOURCE_PATH=app/src/main/java
./cc-test-reporter format-coverage app/build/reports/coverage/debug/report.xml -t jacoco
./cc-test-reporter upload-coverage
