diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fae578f..48321b8 100755 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: force_orphan: true publish_branch: gh-pages - run-tests: + run-tests-with-coverage: runs-on: ubuntu-latest steps: - name: Checkout code @@ -43,3 +43,12 @@ jobs: run: sudo apt-get install gcc make - name: Run tests run: make -C test tests + - name: Coverage data + run: gcov -pb src/**/*.c + - name: List coverage data + run: | + tree ./ + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index 45e82d8..1854052 100755 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ html # test coverage *.gcda *.gcno +*.gcov # Linker output *.ilk diff --git a/README.md b/README.md index 0a74845..1ed8ee6 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ ![CI Status](https://github.com/polesskiy-dev/active-object-fsm/actions/workflows/ci.yml/badge.svg?branch=main) +[![codecov](https://codecov.io/gh/polesskiy-dev/active-object-fsm/graph/badge.svg?token=0MO4ODZ1HA)](https://codecov.io/gh/polesskiy-dev/active-object-fsm) [![Documentation](https://img.shields.io/badge/docs-Doxygen-blue.svg)](https://polesskiy-dev.github.io/active-object-fsm/) ![GitHub release (with filter)](https://img.shields.io/github/v/release/polesskiy-dev/active-object-fsm) diff --git a/docs/active-object-typings.png b/docs/active-object-typings.png deleted file mode 100755 index af69b58..0000000 Binary files a/docs/active-object-typings.png and /dev/null differ diff --git a/test/Makefile b/test/Makefile index b48a99d..74c00ef 100755 --- a/test/Makefile +++ b/test/Makefile @@ -1,5 +1,5 @@ # Compiler -CC = gcc -std=c99 #-Wall -Wextra -Werror -pedantic -g +CC = gcc -std=c99 -fprofile-arcs -ftest-coverage -O0 # Directories SRC_DIR = ../src