Skip to content

Add coverage

Add coverage #7

Workflow file for this run

name: Unit test
on:
workflow_dispatch:
pull_request:
branches:
- main
paths:
- 'src/**'
- 'tests/**'
- '.github/workflows/ut.yml'
jobs:
class:
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup
run: sudo apt-get install -y libgmock-dev ninja-build lcov
- name: Run tests
run: |
ctest --build-and-test . build-tests --build-generator Ninja
ctest --test-dir build-tests
lcov -o tmp.info -c -d build-tests
lcov -o cov.info -r tmp.info '/usr/*' '*/lib/tinyusb/*' '*/tests/*'
lcov -l cov.info