From 73f5d8fc61285eccfb5169514db3d9dd0ede0fd2 Mon Sep 17 00:00:00 2001 From: oir Date: Sat, 11 Nov 2023 22:25:30 -0500 Subject: [PATCH] Add coverage actions --- .github/workflows/build-test.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index d2fa201..5e639cc 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -6,5 +6,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - run: sudo apt-get install lcov - run: make -j2 - - run: ./test.out \ No newline at end of file + - run: ./test.out + - run: | + gcov -b -p -c test.gcno && \ + lcov -c -d . -o cov.info && \ + lcov --remove cov.info '/usr/local/include*' '/usr/include*' '*/extern/*' '*/test.cpp*' -o meanwhile.info + rm cov.info + - name: Coveralls + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: meanwhile.info \ No newline at end of file