sdk/.circleci/config.yml

69 lines
1.6 KiB
YAML
Raw Normal View History

2018-08-20 21:10:40 +02:00
version: 2
2019-06-10 15:42:48 +02:00
references:
workspace_root: &workspace_root
~/api
container_config: &container_config
2018-08-20 21:10:40 +02:00
docker:
- image: circleci/openjdk:8-jdk-stretch
2019-06-10 15:42:48 +02:00
working_directory: *workspace_root
2018-08-20 21:10:40 +02:00
2019-06-10 15:42:48 +02:00
attach_workspace: &attach_workspace
attach_workspace:
at: *workspace_root
2018-08-20 21:10:40 +02:00
2019-06-10 15:42:48 +02:00
general_cache_key: &general_cache_key
key: cache-{{ checksum "build.gradle" }}
2019-06-10 15:46:40 +02:00
paths:
- ~/.gradle
2019-06-10 15:42:48 +02:00
jobs:
test:
<<: *container_config
steps:
- *attach_workspace
2018-08-20 21:10:40 +02:00
- restore_cache:
2019-06-10 15:42:48 +02:00
<<: *general_cache_key
2018-08-20 21:10:40 +02:00
2018-08-31 02:00:58 +02:00
- run: ./.circleci/host-hotfix.sh
2018-08-20 21:10:40 +02:00
- run: ./gradlew build -x check --no-daemon --stacktrace --console=plain -PdisablePreDex
2018-08-25 00:55:36 +02:00
- run: ./gradlew check jacocoTestReport --no-daemon --stacktrace --console=plain -PdisablePreDex
2018-08-20 21:10:40 +02:00
- save_cache:
2019-06-10 15:42:48 +02:00
<<: *general_cache_key
2018-08-20 21:10:40 +02:00
- run: bash <(curl -s https://codecov.io/bash)
- store_test_results:
path: ./build/test-results
- store_artifacts:
path: ./build/reports/jacoco/test
2018-08-31 00:34:33 +02:00
- store_artifacts:
path: ./build/reports/tests/test
2018-08-20 21:10:40 +02:00
- store_artifacts:
2019-06-10 15:42:48 +02:00
path: ./build/libs/api-0.9.2.jar
deploy:
<<: *container_config
steps:
- *attach_workspace
- restore_cache:
<<: *general_cache_key
- run: ./gradlew bintrayUpload --no-daemon --stacktrace --console=plain -PdisablePreDex
2018-08-20 21:10:40 +02:00
workflows:
version: 2
test:
jobs:
- test
2019-06-10 15:42:48 +02:00
- deploy:
requires:
- test
filters:
tags:
only: /\d+\.\d+\.\d+/
branches:
ignore: /.*/