Skip to content

Commit

Permalink
Start actions/coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
agievich committed May 10, 2024
1 parent 69ad457 commit 420affa
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Measure code coverage using Codecov

name: coverage

on:
push:
branches: master
pull_request:
branches: master

jobs:
run:
name: Measure code coverage
runs-on: ubuntu-latest
steps:
- name: Install lcov
run: sudo apt install -y lcov
- name: Get source
uses: actions/checkout@v3
- name: Configure CMake
run: >
CXX=g++ cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=Coverage
- name: Build
run: cmake --build ${{github.workspace}}/build
- name: Run tests
working-directory: ${{github.workspace}}/build
run: |
lcov -c -i -d .. -o coverage_base.info
test/testgf2
- name: Upload coverage reports to Codecov
working-directory: ${{github.workspace}}/build
run: |
lcov -c -d .. -o coverage_test.info
lcov -a coverage_base.info -a coverage_test.info -o coverage.info
bash <(curl -s https://codecov.io/bash) -f coverage.info
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,5 @@
# Specific files
.aux
apps
backup
build
support
clear.cmd

0 comments on commit 420affa

Please sign in to comment.