Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Commit

Permalink
Add Codecov test coverage (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
awegrzyn authored Jul 30, 2019
1 parent 92c38b0 commit b5905b1
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 5 deletions.
21 changes: 21 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
codecov:
notify:
after_n_builds: 1

coverage:
precision: 2
round: nearest
range: 60...90
status:
project: true
patch: false
changes: false

ignore:
- cmake/*
- test/*
- src/HTTP.*
- src/UDP.*
- src/UnixSocket.*

comment: false
14 changes: 12 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,28 @@ matrix:
sources:
- ubuntu-toolchain-r-test
packages:
- lcov
- gcc-8
- g++-8
- cmake
- libboost-system1.58-dev
- libboost-test1.58-dev
- libboost-program-options1.58-dev
before_script:
before_script:
- cd $TRAVIS_BUILD_DIR; mkdir build; cd build
script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cmake ..;
else cmake .. -DCMAKE_C_COMPILER=/usr/bin/gcc-8 -DCMAKE_CXX_COMPILER=/usr/bin/g++-8; fi;
else cmake .. -DCMAKE_C_COMPILER=/usr/bin/gcc-8 -DCMAKE_CXX_COMPILER=/usr/bin/g++-8 -DCMAKE_BUILD_TYPE=Debug; fi;
- make -j
- make test
after_success:
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
cd ${TRAVIS_BUILD_DIR}/build
lcov --directory . --capture --output-file coverage.info
lcov --remove coverage.info '/opt/*' '/usr/*' --output-file coverage.info
lcov --list coverage.info
bash <(curl -s https://codecov.io/bash) || echo "No coverage reports"
fi;
notifications:
email: false
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ else()
endif()

# Define project
project(InfluxDB-Client
project(influxdb-cxx
VERSION 0.0.1
DESCRIPTION "InfluxDB C++ client library"
LANGUAGES CXX
Expand Down Expand Up @@ -77,8 +77,8 @@ set(SRCS
# Create library
add_library(InfluxDB SHARED ${SRCS})
target_include_directories(InfluxDB
PUBLIC
$<INSTALL_INTERFACE:include>
PUBLIC
$<INSTALL_INTERFACE:include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
Expand Down

0 comments on commit b5905b1

Please sign in to comment.