API as java module (#34)

This commit is contained in:
Mikołaj Pich
2017-11-18 22:17:18 +01:00
committed by Rafał Borcz
parent 428b372827
commit 29d12b79ca
90 changed files with 352 additions and 34 deletions

View File

@ -61,23 +61,23 @@ jobs:
- store_test_results:
path: ./app/build/reports/
test:
app-test:
<<: *container_config
steps:
- *attach_workspace
- restore_cache:
<<: *general_cache_key
- run:
name: Run Tests
command: ./gradlew --no-daemon --stacktrace test
name: Run app tests
command: ./gradlew --no-daemon --stacktrace :app:test
- run:
name: Upload unit code coverage to codecov
command: |
./gradlew --no-daemon --stacktrace jacocoTestReport
bash <(curl -s https://codecov.io/bash) -F unit
./gradlew --no-daemon --stacktrace :app:jacocoTestReport
bash <(curl -s https://codecov.io/bash) -F app
- run:
name: Upload code coverage to codacy
command: ./gradlew --no-daemon --stacktrace codacyUpload
command: ./gradlew --no-daemon --stacktrace :app:codacyUpload
- store_artifacts:
path: ./app/build/reports/tests/
destination: tests_reports/
@ -87,6 +87,32 @@ jobs:
- store_test_results:
path: ./app/build/test-results
api-test:
<<: *container_config
steps:
- *attach_workspace
- restore_cache:
<<: *general_cache_key
- run:
name: Run api tests
command: ./gradlew --no-daemon --stacktrace :api:test
- run:
name: Upload unit code coverage to codecov
command: |
./gradlew --no-daemon --stacktrace :api:jacocoTestReport
bash <(curl -s https://codecov.io/bash) -F api
- run:
name: Upload code coverage to codacy
command: ./gradlew --no-daemon --stacktrace :api:codacyUpload
- store_artifacts:
path: ./api/build/reports/tests/
destination: tests_reports/
- store_artifacts:
path: ./api/build/reports/jacoco/test/
destination: coverage_reports/
- store_test_results:
path: ./api/build/test-results
instrumented:
<<: *container_config
steps:
@ -133,7 +159,10 @@ workflows:
- lint:
requires:
- build
- test:
- app-test:
requires:
- build
- api-test:
requires:
- build
- instrumented: