Skip to content

Tests coverage: add codecov #91

Tests coverage: add codecov

Tests coverage: add codecov #91

Workflow file for this run

name: ci
on:
pull_request:
push:
branches: [main, master]
jobs:
deploy-gh-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v3
with:
submodules: recursive
# Build the HTML documentation
- name: Doxygen Action
run: |
sudo apt-get install -y doxygen
doxygen Doxyfile
# Deploy the HTML documentation to GitHub Pages
- name: GH Pages Deployment
# https://github.com/peaceiris/actions-gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# deploy ./html directory to the remote gh-pages branch.
publish_dir: ./html
enable_jekyll: false
allow_empty_commit: false
force_orphan: true
publish_branch: gh-pages
run-tests-with-coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
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 }}