mirror of
https://github.com/wulkanowy/wulkanowy.git
synced 2024-11-13 23:10:26 -06:00
95 lines
2.2 KiB
YAML
95 lines
2.2 KiB
YAML
|
version: 2
|
||
|
|
||
|
references:
|
||
|
|
||
|
workspace_root: &workspace_root
|
||
|
~/wulkanowy
|
||
|
|
||
|
container_config: &container_config
|
||
|
docker:
|
||
|
- image: circleci/android:api-25-alpha
|
||
|
working_directory: *workspace_root
|
||
|
environment:
|
||
|
environment:
|
||
|
JVM_OPTS: -Xmx3200m
|
||
|
|
||
|
attach_workspace: &attach_workspace
|
||
|
attach_workspace:
|
||
|
at: *workspace_root
|
||
|
|
||
|
general_cache_key: &general_cache_key
|
||
|
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
|
||
|
|
||
|
jobs:
|
||
|
|
||
|
build:
|
||
|
<<: *container_config
|
||
|
steps:
|
||
|
- checkout
|
||
|
- restore_cache:
|
||
|
<<: *general_cache_key
|
||
|
- run:
|
||
|
name: Setup environment
|
||
|
command: ./gradlew --no-daemon --stacktrace dependencies || true
|
||
|
- run:
|
||
|
name: Initial build
|
||
|
command: ./gradlew --no-daemon --stacktrace assembleDebug
|
||
|
- store_artifacts:
|
||
|
path: ./app/build/outputs/apk/
|
||
|
destination: apks/
|
||
|
- persist_to_workspace:
|
||
|
root: *workspace_root
|
||
|
paths:
|
||
|
- .
|
||
|
- save_cache:
|
||
|
<<: *general_cache_key
|
||
|
paths:
|
||
|
- "~/.gradle"
|
||
|
|
||
|
lint:
|
||
|
<<: *container_config
|
||
|
steps:
|
||
|
- *attach_workspace
|
||
|
- restore_cache:
|
||
|
<<: *general_cache_key
|
||
|
- run:
|
||
|
name: Run lint
|
||
|
command: ./gradlew --no-daemon --stacktrace lint
|
||
|
- store_artifacts:
|
||
|
path: ./app/build/reports/
|
||
|
destination: lint_reports/app/
|
||
|
|
||
|
test:
|
||
|
<<: *container_config
|
||
|
steps:
|
||
|
- *attach_workspace
|
||
|
- restore_cache:
|
||
|
<<: *general_cache_key
|
||
|
- run:
|
||
|
name: Run Tests
|
||
|
command: ./gradlew --no-daemon --stacktrace test
|
||
|
- run:
|
||
|
name: Upload code coverage
|
||
|
command: ./gradlew --no-daemon --stacktrace codacyUpload
|
||
|
- store_artifacts:
|
||
|
path: ./app/build/reports/tests/
|
||
|
destination: tests_reports/
|
||
|
- store_artifacts:
|
||
|
path: ./app/build/reports/jacoco/jacocoTestDebugUnitTestReport/
|
||
|
destination: coverage_reports/
|
||
|
- store_test_results:
|
||
|
path: ./app/build/test-results
|
||
|
|
||
|
workflows:
|
||
|
version: 2
|
||
|
|
||
|
build_check_tests:
|
||
|
jobs:
|
||
|
- build
|
||
|
- lint:
|
||
|
requires:
|
||
|
- build
|
||
|
- test:
|
||
|
requires:
|
||
|
- build
|