Skip to content

Commit

Permalink
Tests coverage: add codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
polesskiy-dev committed Oct 18, 2023
1 parent e70712e commit d2c1af6
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -43,3 +43,14 @@ jobs:
run: sudo apt-get install gcc make
- name: Run tests
run: make -C test tests
- name: List coverage data
run: |
ls -R coverage/ |
cat coverage/lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
gcov: true
gcov_include: src/fsm/fsm.c
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ html
# test coverage
*.gcda
*.gcno
*.gcov

# Linker output
*.ilk
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
Binary file removed docs/active-object-typings.png
Binary file not shown.
2 changes: 1 addition & 1 deletion test/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit d2c1af6

Please sign in to comment.