Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Codecov reports to Github PR checks #3663

Merged
merged 1 commit into from
Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ assemble-core-release:
core-unit-tests:
$(call run-gradle-tasks,$(CORE_MODULES),test)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jacoco is slow and heavy, could you add a separate makefile command for tests with coverage so that it doesn't impact the duration of tests that we run during local development?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, checked the CI building times and sometimes they even take longer

This build -> 9m 17s / 2m 26s https://app.circleci.com/pipelines/github/mapbox/mapbox-navigation-android/9084/workflows/e494e304-e6c5-4d10-bbd7-9a8f4a339e1d/jobs/33801

#3661 build -> 12m 45s / 3m 4s https://app.circleci.com/pipelines/github/mapbox/mapbox-navigation-android/9090/workflows/1b3e8626-1735-4867-a43b-30d123b7a072/jobs/33832 (not sure if we added a bunch of low tests as part of #3661)

#3664 build -> 9m 12s / 2m 15s https://app.circleci.com/pipelines/github/mapbox/mapbox-navigation-android/9085/workflows/38332f8f-217f-4988-bedb-6a55816a2f70/jobs/33808

Will add a separate command to scratch a couple of seconds 👍


.PHONY: core-unit-tests-jacoco
core-unit-tests-jacoco:
$(call run-gradle-tasks,$(CORE_MODULES),jacocoTestReport)

.PHONY: core-publish-to-sdk-registry
core-publish-to-sdk-registry:
$(call run-gradle-tasks,$(CORE_MODULES),mapboxSDKRegistryUpload)
Expand Down Expand Up @@ -115,6 +119,10 @@ assemble-ui-release:
ui-unit-tests:
$(call run-gradle-tasks,$(UI_MODULES),test)

.PHONY: ui-unit-tests-jacoco
ui-unit-tests-jacoco:
$(call run-gradle-tasks,$(UI_MODULES),jacocoTestReport)

.PHONY: ui-publish-to-sdk-registry
ui-publish-to-sdk-registry:
$(call run-gradle-tasks,$(UI_MODULES),mapboxSDKRegistryUpload)
Expand Down
17 changes: 13 additions & 4 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,9 @@ commands:
unit-tests-core:
steps:
- run:
name: Run Navigation Core SDK Unit Tests
command: make core-unit-tests
name: Run Navigation Core SDK Unit Tests and generate Jacoco test report
command: |
make core-unit-tests-jacoco
- store-results:
module_target: "libnavigation-router"
- store-results:
Expand All @@ -183,11 +184,18 @@ commands:
unit-tests-ui:
steps:
- run:
name: Run Navigation UI SDK Unit Tests
command: make ui-unit-tests
name: Run Navigation UI SDK Unit Tests and generate Jacoco test report
command: |
make ui-unit-tests-jacoco
- store-results:
module_target: "libnavigation-ui"

codecov:
steps:
- run:
name: Post code coverage reports to Codecov.io
command: pip install --user codecov && /root/.local/bin/codecov

generate-version-name:
steps:
- run:
Expand Down Expand Up @@ -328,6 +336,7 @@ jobs:
- checkout
- unit-tests-core
- unit-tests-ui
- codecov

static-analysis:
working_directory: ~/code
Expand Down