From fedef689cdc991287a37b3f915a859998fe1480e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oona=20R=C3=A4is=C3=A4nen?= Date: Wed, 25 Sep 2024 23:34:16 +0300 Subject: [PATCH] Upload test coverage info to Codecov --- .github/workflows/build.yml | 11 +++++++++-- README.md | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5199659..c611334 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,9 +79,9 @@ jobs: steps: - uses: actions/checkout@v4 - name: Install dependencies (brew) - run: brew install meson libsndfile liquid-dsp nlohmann-json catch2 perl + run: brew install meson libsndfile liquid-dsp nlohmann-json catch2 perl gcovr - name: meson setup - run: meson setup -Dwerror=true -Db_sanitize=address,undefined -Db_lundef=false build + run: meson setup -Dwerror=true -Db_sanitize=address,undefined -Db_lundef=false -Db_coverage=true build - name: compile & install run: cd build && meson install - name: download test data @@ -90,6 +90,13 @@ jobs: run: cd build && meson test - name: Test command-line interface run: perl test/cli.pl redsea --installed + - name: Coverage + run: cd build && ninja coverage-xml + - name: Upload to Codecov + uses: codecov/codecov-action@v4 + with: + files: build/meson-logs/coverage.xml + token: ${{ secrets.CODECOV_TOKEN }} build-windows-msys2-mingw: runs-on: windows-latest diff --git a/README.md b/README.md index b43de2c..b8eeda1 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ redsea is a lightweight command-line [FM-RDS](https://en.wikipedia.org/wiki/Radi decoder that supports many [RDS features][Wiki: Features]. [![release](https://img.shields.io/github/release/windytan/redsea.svg)](https://github.com/windytan/redsea/releases/latest) -![build](https://github.com/windytan/redsea/workflows/build/badge.svg) +[![build](https://github.com/windytan/redsea/workflows/build/badge.svg)](https://github.com/windytan/redsea/actions/workflows/build.yml?query=branch%3Amaster) +[![codecov](https://codecov.io/github/windytan/redsea/graph/badge.svg?token=rlYtqSE4Cx)](https://codecov.io/github/windytan/redsea) It prints [newline-delimited JSON](https://jsonlines.org/) where each line corresponds to one RDS group. It can also print "raw" undecoded hex blocks (`--output hex`).