From 3241491f720846741e76a07778db486598cbc745 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Sat, 5 Jun 2021 23:44:27 +0200 Subject: [PATCH] CI: Add coverage job and upload to codecov --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 669b7fb..28ac89e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,3 +35,33 @@ jobs: - name: Test creating the release archive run: make distcheck + + coverage: + name: Check code coverage + runs-on: ubuntu-latest + env: + CC: gcc + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Build the code + run: make CFLAGS=-coverage + + - name: Run tests under coverage + run: make check + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + name: codecov-gcc + #fail_ci_if_error: true + path_to_write_report: ./codecov-report.txt + #verbose: true + + - name: Archive code coverage result + uses: 'actions/upload-artifact@v2' + with: + name: code-coverage-gcc + path: codecov-report.txt