mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
create coverage actions (#3483)
* add coveralls coverage actions to tests * using Ninja for Build * exclude build directory in coverage report * let distro tests run after successful coverage run * add coveralls badge to readme Closes #3413.
This commit is contained in:
parent
0119867223
commit
c44229dd32
2 changed files with 36 additions and 1 deletions
36
.github/workflows/tests.yaml
vendored
36
.github/workflows/tests.yaml
vendored
|
@ -1,10 +1,42 @@
|
||||||
## Run the Taskwarrior tests, using stable rust to build TaskChampion.
|
## Run the Taskwarrior tests, using stable rust to build TaskChampion.
|
||||||
|
|
||||||
name: tests
|
name: tests
|
||||||
|
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
coverage:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Install apt packages
|
||||||
|
run: sudo apt-get install -y build-essential cmake git uuid-dev faketime locales python3 curl gcovr ninja-build
|
||||||
|
|
||||||
|
- name: Check out this repository
|
||||||
|
uses: actions/checkout@v4.1.6
|
||||||
|
|
||||||
|
- name: Configure project
|
||||||
|
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS=--coverage
|
||||||
|
|
||||||
|
- name: Build project
|
||||||
|
run: cmake --build build --target build_tests
|
||||||
|
|
||||||
|
- name: Test project
|
||||||
|
run: ctest --test-dir build -j 8 --output-on-failure
|
||||||
|
|
||||||
|
- name: Generate a code coverage report
|
||||||
|
uses: threeal/gcovr-action@v1.0.0
|
||||||
|
with:
|
||||||
|
coveralls-out: coverage.coveralls.json
|
||||||
|
excludes: |
|
||||||
|
build
|
||||||
|
|
||||||
|
- name: Sent to Coveralls
|
||||||
|
uses: coverallsapp/github-action@v2
|
||||||
|
with:
|
||||||
|
file: coverage.coveralls.json
|
||||||
|
|
||||||
# MacOS tests do not run in Docker, and use the actions-rs Rust installaction
|
# MacOS tests do not run in Docker, and use the actions-rs Rust installaction
|
||||||
tests-macos-12:
|
tests-macos-12:
|
||||||
|
needs: coverage
|
||||||
name: tests (Mac OS 12.latest)
|
name: tests (Mac OS 12.latest)
|
||||||
if: false # see #3242
|
if: false # see #3242
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
@ -33,6 +65,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
tests-macos-13:
|
tests-macos-13:
|
||||||
|
needs: coverage
|
||||||
name: tests (Mac OS 13.latest)
|
name: tests (Mac OS 13.latest)
|
||||||
if: false # see #3242
|
if: false # see #3242
|
||||||
runs-on: macos-13
|
runs-on: macos-13
|
||||||
|
@ -62,6 +95,7 @@ jobs:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
|
needs: coverage
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<img src="https://avatars.githubusercontent.com/u/36100920?s=200&u=24da05914c20c4ccfe8485310f7b83049407fa9a&v=4"></br>
|
<img src="https://avatars.githubusercontent.com/u/36100920?s=200&u=24da05914c20c4ccfe8485310f7b83049407fa9a&v=4"></br>
|
||||||
|
|
||||||
[](https://github.com/GothenburgBitFactory/taskwarrior/actions)
|
[](https://github.com/GothenburgBitFactory/taskwarrior/actions)
|
||||||
|
[](https://coveralls.io/github/GothenburgBitFactory/taskwarrior?branch=add-coverage-actions)
|
||||||
[](https://github.com/GothenburgBitFactory/taskwarrior/releases/latest)
|
[](https://github.com/GothenburgBitFactory/taskwarrior/releases/latest)
|
||||||
[](https://github.com/GothenburgBitFactory/taskwarrior/releases/latest)
|
[](https://github.com/GothenburgBitFactory/taskwarrior/releases/latest)
|
||||||
[](https://github.com/sponsors/GothenburgBitFactory/)
|
[](https://github.com/sponsors/GothenburgBitFactory/)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue