Skip to content

Commit

Permalink
Add codecov yml, add baseline report, add badge
Browse files Browse the repository at this point in the history
  • Loading branch information
lebdron committed Sep 13, 2017
1 parent 34b6d58 commit 87b60b9
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,14 @@ jobs:
- run:
name: make
command: cmake --build $IROHA_BUILD -- -j4
- run:
name: code coverage pre
command: cmake --build $IROHA_BUILD --target coverage.init.info
- run:
name: run tests
command: cmake --build $IROHA_BUILD --target test
- run:
name: code coverage
name: code coverage post
command: |
cmake --build $IROHA_BUILD --target coverage.info
lcov --list $IROHA_BUILD/coverage.info
Expand Down
28 changes: 28 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
codecov:
branch: default
coverage:
range: 50...100
status:
patch:
default:
target: 50
project:
default:
target: auto
threshold: 0.05
cli:
target: auto
threshold: 0.05
paths: "iroha-cli/"
daemon:
target: auto
threshold: 0.05
paths: "irohad/"
tests:
target: auto
paths: "test/"
changes:
default:
enabled: no
comment:
layout: "reach, diff, flags, files, footer"
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ if(COVERAGE)
set(CMAKE_C_FLAGS "--coverage ${CMAKE_C_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "--coverage ${CMAKE_SHARED_LINKER_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "--coverage ${CMAKE_EXE_LINKER_FLAGS}")
add_custom_target(coverage.init.info
COMMAND ${LCOV_PROGRAM} -o ${PROJECT_BINARY_DIR}/coverage.init.info -c -i -d ${PROJECT_BINARY_DIR}
)
add_custom_target(coverage.info
COMMAND ${LCOV_PROGRAM} -o ${PROJECT_BINARY_DIR}/coverage.info -c -d ${PROJECT_BINARY_DIR}
COMMAND ${LCOV_PROGRAM} -o ${PROJECT_BINARY_DIR}/coverage.info -a ${PROJECT_BINARY_DIR}/coverage.init.info -a ${PROJECT_BINARY_DIR}/coverage.info
COMMAND ${LCOV_PROGRAM} -o ${PROJECT_BINARY_DIR}/coverage.info -r ${PROJECT_BINARY_DIR}/coverage.info '/usr*' '${CMAKE_SOURCE_DIR}/external/*'
)
endif()
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/960/badge)](https://bestpractices.coreinfrastructure.org/projects/960)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/4d8edb74d4954c76a4656a9e109dbc4e)](https://www.codacy.com/app/neewy/iroha?utm_source=github.com&utm_medium=referral&utm_content=hyperledger/iroha&utm_campaign=Badge_Grade)
[![CircleCI](https://circleci.com/gh/hyperledger/iroha/tree/master.svg?style=svg)](https://circleci.com/gh/hyperledger/iroha/tree/master)
[![codecov](https://codecov.io/gh/hyperledger/iroha/branch/master/graph/badge.svg)](https://codecov.io/gh/hyperledger/iroha)

Blockchain platform Hyperledger Iroha is designed for simple creation and management of assets. This is a distributed ledger of transactions.

Expand Down

0 comments on commit 87b60b9

Please sign in to comment.