diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fae578f..852cb4b 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 @@ -42,4 +42,13 @@ jobs: - name: Install dependencies run: sudo apt-get install gcc make - name: Run tests - run: make -C test tests + run: make + - name: Coverage data + run: gcov -bc 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/test/Makefile b/Makefile similarity index 83% rename from test/Makefile rename to Makefile index b48a99d..7c20d2a 100755 --- a/test/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Compiler -CC = gcc -std=c99 #-Wall -Wextra -Werror -pedantic -g +CC = gcc -std=c99 -fprofile-arcs -ftest-coverage -O0 # Directories -SRC_DIR = ../src -TEST_DIR = ./ -UNITY_DIR = ../libraries/Unity/src +SRC_DIR = src +TEST_DIR = test +UNITY_DIR = libraries/Unity/src # Source files and objects SRCS = $(wildcard $(SRC_DIR)/**/*.c) 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