diff options
author | Stefan <29021710+Saalvage@users.noreply.github.com> | 2022-01-20 15:06:51 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-20 15:06:51 +0300 |
commit | bf037c1f3b8d08f59764811886115d2026f05844 (patch) | |
tree | 141f0f9091f289c2ddddb750a12a64b95f7abc0a /.github | |
parent | 76cc1371e7207a94018d1a5539819bdbeb99c12a (diff) |
Fix coverage (#594)
* Run with coverage
* Epic checkout failure
* Install Ninja
* lcov
* Install LCOV
* Use cd
* .
* G
* ???
* Replace fake unicode characters
* Add coveralls
* Setup base-path
* cmake flag hack?
* Proper inclusion
* Proper inclusion (for real this time!)
* Try compile using gcc over clang?
* Specify build type
* Try fix
* coveralls -> codecov
* Remove redundant stuff
* Fix typo
* README codecov
* Remove CODE_COVERAGE CMake flag
* Remove missed endif()
* Readd tests
* Fix codecov href
* Readd empty lines
* Fix whitespace
* Update Patreon logo
* Update donate buttons
* Update donate buttons
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/main.yml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8381c553..59957e7e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,6 +14,36 @@ env: CTEST_PARALLEL_LEVEL: 2 jobs: + coverage: + if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install + run: sudo apt-get install -y ninja-build lcov + + - name: Generate + run: cmake -B build -S . -G Ninja -D CMAKE_CXX_FLAGS="-fprofile-arcs -ftest-coverage" + + - name: Build + run: cmake --build build + + - name: Test + run: ctest --test-dir build --no-tests=error + + - name: LCOV + run: | + mkdir coverage + lcov -c -d build/ -o coverage/lcov.info --include "*doctest/parts*" + + - name: Codecov + uses: codecov/codecov-action@v2 + with: + files: ./coverage/lcov.info + fail_ci_if_error: true + ci: if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository runs-on: ${{ matrix.os }} |