Skip to content

Commit

Permalink
ci: collect code coverage (#5516)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerixyz committed Jul 21, 2024
1 parent 44abb19 commit 21186df
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
comment: false
ignore:
- "/usr/local*/**/*"
- "/usr/include/**/*"
- "lib/"
- "**/ui_*.h"
- "**/moc_*.cpp"
20 changes: 17 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
pull_request:
workflow_dispatch:
merge_group:
push:
branches:
- master
- main

env:
TWITCH_PUBSUB_SERVER_TAG: v1.0.7
Expand Down Expand Up @@ -39,11 +43,11 @@ jobs:
- name: Create build directory (Ubuntu)
run: mkdir build-test

- name: Install googlebench
- name: Install dependencies
run: |
sudo apt update
sudo apt -y install \
libbenchmark-dev
sudo DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install \
libbenchmark-dev gcovr gnupg
- name: Build (Ubuntu)
run: |
Expand All @@ -55,6 +59,8 @@ jobs:
-DCMAKE_PREFIX_PATH="$Qt6_DIR/lib/cmake" \
-DBUILD_WITH_QT6="$C2_BUILD_WITH_QT6" \
-DCHATTERINO_STATIC_QT_BUILD=On \
-DCHATTERINO_GENERATE_COVERAGE=On \
-DCMAKE_BUILD_TYPE=Debug \
..
cmake --build .
working-directory: build-test
Expand Down Expand Up @@ -84,3 +90,11 @@ jobs:
cd ../build-test
ctest --repeat until-pass:4 --output-on-failure --exclude-regex ClassicEmoteNameFiltering
working-directory: build-test

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.5.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
plugin: gcov
fail_ci_if_error: true
verbose: true

0 comments on commit 21186df

Please sign in to comment.