Add code coverage (#22)

This commit is contained in:
Bailey Thompson
2019-04-30 03:23:35 -04:00
committed by GitHub
parent dd7af1e03c
commit 6b297bfc51
4 changed files with 8 additions and 1 deletions

View File

@@ -2,12 +2,13 @@ version: 2
jobs:
build_and_test:
docker:
- image: mickare/cmake-clang
- image: rikorose/gcc-cmake:gcc-8
steps:
- checkout
- run: cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" .
- run: cmake --build . --target Containers -- -j 2
- run: ./Containers
- run: bash <(curl -s https://codecov.io/bash)
workflows:
version: 2
build_and_test:

3
.codecov.yml Normal file
View File

@@ -0,0 +1,3 @@
ignore:
- "tst"

View File

@@ -3,6 +3,8 @@ project(Containers C)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_FLAGS "-g -O0 -Wall -fprofile-arcs -ftest-coverage")
add_executable(Containers tst/test.c tst/test.h
src/array.c src/array.h tst/array.c
src/vector.c src/vector.h tst/vector.c

View File

@@ -1,4 +1,5 @@
[![CircleCI](https://circleci.com/gh/bkthomps/Containers/tree/master.svg?style=shield)](https://circleci.com/gh/bkthomps/Containers/tree/master)
[![codecov](https://codecov.io/gh/bkthomps/Containers/branch/master/graph/badge.svg)](https://codecov.io/gh/bkthomps/Containers)
[![Documentation](https://codedocs.xyz/bkthomps/Containers.svg)](https://codedocs.xyz/bkthomps/Containers/)
# Containers