forked from openstreetmap/mod_tile
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add coverage reporting support (openstreetmap#313)
* Add coverage reporting * No longer need to run `astyle` from within a container * Multiple test runs seems to help catch more coverage * Re-order renderd shutdown processes * Move coverage job into a new workflow
- Loading branch information
1 parent
d408481
commit 7085275
Showing
6 changed files
with
67 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
name: Coverage | ||
|
||
on: | ||
- push | ||
|
||
jobs: | ||
Coverage: | ||
name: Build, Test & Report Coverage | ||
runs-on: ubuntu-latest | ||
env: | ||
CFLAGS: --coverage | ||
CXXFLAGS: --coverage | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
uses: ./.github/actions/dependencies/install | ||
with: | ||
ubuntu-test-dependencies: >- | ||
apache2 | ||
lcov | ||
- name: Build `mod_tile` | ||
uses: ./.github/actions/cmake/build | ||
|
||
- name: Test `mod_tile` | ||
uses: ./.github/actions/cmake/test | ||
|
||
- name: Test `mod_tile` again (to gather more coverage data) | ||
uses: ./.github/actions/cmake/test | ||
|
||
- name: Process `mod_tile` coverage results | ||
run: | | ||
ctest -T coverage | ||
lcov \ | ||
--capture \ | ||
--directory . \ | ||
--output-file coverage.info | ||
lcov \ | ||
--output-file coverage.info \ | ||
--remove coverage.info \ | ||
"${GITHUB_WORKSPACE}/includes/catch.hpp" \ | ||
"${GITHUB_WORKSPACE}/src/gen_tile_test.cpp" \ | ||
"/usr/*" | ||
genhtml coverage.info --output-directory coverage | ||
working-directory: build | ||
|
||
- name: Upload `mod_tile` coverage results artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Coverage Results | ||
path: build/coverage | ||
|
||
- name: Report `mod_tile` coverage results to `codecov.io` | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: build/coverage.info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters