add code-coverage workflow

This commit is contained in:
Alon Faraj 2023-08-31 11:43:31 +03:00
parent 9129ba88f8
commit 997a88c213

18
.github/workflows/code-coverage.yml vendored Normal file
View file

@ -0,0 +1,18 @@
name: Code coverage
on: [push, pull_request]
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: make LLAMA_CODE_COVERAGE=1 all
- name: Run tests
run: |
make test
make coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: lcov-report/coverage.info