Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create coverage actions #3483

Merged
merged 15 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,42 @@
## Run the Taskwarrior tests, using stable rust to build TaskChampion.

name: tests

on: [push, pull_request]

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
tests-macos-12:
needs: coverage
name: tests (Mac OS 12.latest)
if: false # see #3242
runs-on: macos-latest
Expand Down Expand Up @@ -33,6 +65,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tests-macos-13:
needs: coverage
name: tests (Mac OS 13.latest)
if: false # see #3242
runs-on: macos-13
Expand Down Expand Up @@ -62,6 +95,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

tests:
needs: coverage
strategy:
fail-fast: false
matrix:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<img src="https://avatars.githubusercontent.com/u/36100920?s=200&u=24da05914c20c4ccfe8485310f7b83049407fa9a&v=4"></br>

[![GitHub Actions build status](https://github.com/GothenburgBitFactory/taskwarrior/workflows/tests/badge.svg?branch=develop)](https://github.com/GothenburgBitFactory/taskwarrior/actions)
[![Coverage Status](https://coveralls.io/repos/github/GothenburgBitFactory/taskwarrior/badge.svg?branch=add-coverage-actions)](https://coveralls.io/github/GothenburgBitFactory/taskwarrior?branch=add-coverage-actions)
[![Release](https://img.shields.io/github/v/release/GothenburgBitFactory/taskwarrior)](https://github.com/GothenburgBitFactory/taskwarrior/releases/latest)
[![Release date](https://img.shields.io/github/release-date/GothenburgBitFactory/taskwarrior)](https://github.com/GothenburgBitFactory/taskwarrior/releases/latest)
[![GitHub Sponsors](https://img.shields.io/github/sponsors/GothenburgBitFactory?color=green)](https://github.com/sponsors/GothenburgBitFactory/)
Expand Down
Loading