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 3be53a8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
9 changes: 8 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,10 @@ jobs:
run: sudo apt-get install gcc make
- name: Run tests
run: make -C test tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
gcov: true
gcov_include: src/**/*.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
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 #-Wall -Wextra -Werror -pedantic -g

# Directories
SRC_DIR = ../src
Expand Down

0 comments on commit 3be53a8

Please sign in to comment.