Skip to content

Commit

Permalink
Use Codecov (#8388)
Browse files Browse the repository at this point in the history
* Use Codecov

Upload coverage reports to Codecov. For now, having Codecov comment on
PRs or enforcing a minimum coverage threshold are both disabled until
the Codecov coverage reports look reliable:
https://codecov.io/gh/apache/incubator-druid

* Split bash and curl into separate lines
  • Loading branch information
ccaominh authored and gianm committed Aug 28, 2019
1 parent 6327cb3 commit 31e6280
Show file tree
Hide file tree
Showing 7 changed files with 152 additions and 34 deletions.
31 changes: 31 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


# Documentation for Codecov yaml: https://docs.codecov.io/docs/codecov-yaml
#
# Validate changes with:
# curl --data-binary @.codecov.yml https://codecov.io/validate

# Documentation for pull request comments: https://docs.codecov.io/docs/pull-request-comments
# Consider enabling pull request comments after codecov reports look reliable.
comment: off

coverage:
# Documentation for commit status: https://docs.codecov.io/docs/commit-status
# Consider enabling commit status to enforce minimum coverage thresholds after codecov reports look reliable.
status:
project: off
patch: off
17 changes: 16 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ matrix:
${MAVEN_SKIP} -Dremoteresources.skip=true
- sh -c "dmesg | egrep -i '(oom|out of memory|kill process|killed).*' -C 1 || exit 0"
- free -m
after_success: &upload_java_unit_test_coverage
- ${MVN} -pl ${MAVEN_PROJECTS} jacoco:report
# retry in case of network error
- travis_retry curl -o codecov.sh -s https://codecov.io/bash
- travis_retry bash codecov.sh -X gcov

- name: "processing module test (SQL Compatibility)"
env: *processing_env
Expand All @@ -127,43 +132,53 @@ matrix:
${MAVEN_SKIP} -Dremoteresources.skip=true
- sh -c "dmesg | egrep -i '(oom|out of memory|kill process|killed).*' -C 1 || exit 0"
- free -m
after_success: *upload_java_unit_test_coverage

- name: "indexing modules test"
env: &indexing_env
- MAVEN_PROJECTS='indexing-hadoop,indexing-service,extensions-core/kafka-indexing-service,extensions-core/kinesis-indexing-service'
before_script: *setup_java_test
script: *run_java_test
after_success: *upload_java_unit_test_coverage

- name: "indexing modules test (SQL Compatibility)"
env: *indexing_env
before_script: *setup_java_test
script: *run_java_sql_compat_test
after_success: *upload_java_unit_test_coverage

- name: "server module test"
env: &server_env
- MAVEN_PROJECTS='server'
before_script: *setup_java_test
script: *run_java_test
after_success: *upload_java_unit_test_coverage

- name: "server module test (SQL Compatibility)"
env: *server_env
before_script: *setup_java_test
script: *run_java_sql_compat_test
after_success: *upload_java_unit_test_coverage

- name: "other modules test"
env: &other_env
- MAVEN_PROJECTS='!processing,!indexing-hadoop,!indexing-service,!extensions-core/kafka-indexing-service,!extensions-core/kinesis-indexing-service,!server,!web-console'
before_script: *setup_java_test
script: *run_java_test
after_success: *upload_java_unit_test_coverage

- name: "other modules test (SQL Compatibility)"
env: *other_env
before_script: *setup_java_test
script: *run_java_sql_compat_test
after_success: *upload_java_unit_test_coverage

- name: "web console"
install: skip
script: ${MVN} test -pl 'web-console'
script:
- ${MVN} test -pl 'web-console'
after_success:
- (cd web-console && travis_retry npm run codecov) # retry in case of network error

- name: "docs"
install: (cd website && npm install)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
[![Slack](https://img.shields.io/badge/slack-%23druid-72eff8?logo=slack)](https://druid.apache.org/community/join-slack)
[![Build Status](https://travis-ci.org/apache/incubator-druid.svg?branch=master)](https://travis-ci.org/apache/incubator-druid)
[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/apache/incubator-druid.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/apache/incubator-druid/context:java)
[![Coverage Status](https://img.shields.io/codecov/c/gh/apache/incubator-druid)](https://codecov.io/gh/apache/incubator-druid)
[![Docker](https://img.shields.io/badge/container-docker-blue.svg)](https://hub.docker.com/r/apache/incubator-druid)
<!--- Following badges are disabled until they can be fixed: -->
<!--- [![Coverage Status](https://coveralls.io/repos/github/apache/incubator-druid/badge.svg?branch=master)](https://coveralls.io/github/apache/incubator-druid?branch=master) -->
<!--- [![Inspections Status](https://img.shields.io/teamcity/http/teamcity.jetbrains.com/s/OpenSourceProjects_Druid_Inspections.svg?label=TeamCity%20inspections)](https://teamcity.jetbrains.com/viewType.html?buildTypeId=OpenSourceProjects_Druid_Inspections) -->

## Apache Druid (incubating)
Expand Down
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,8 @@
<exclude>org/apache/druid/data/input/influx/InfluxLineProtocol*</exclude> <!-- extensions-contrib/influx-extensions -->

<!-- Ignore non-production code -->
<exclude>org/apache/druid/**/*Benchmark.*</exclude> <!-- benchmarks -->
<exclude>org/apache/druid/benchmark/**/*</exclude> <!-- benchmarks -->
<exclude>org/apache/druid/**/*Benchmark*</exclude> <!-- benchmarks -->
<exclude>org/testng/DruidTestRunnerFactory*</exclude> <!-- benchmarks -->
<exclude>org/apache/druid/testing/**/*</exclude> <!-- integration-tests -->
</excludes>
Expand Down
Loading

0 comments on commit 31e6280

Please sign in to comment.