Skip to content

Commit c2f89d1

Browse files
committed
Add: CI: update gcovr for code coverage;
Add: Makefile: gcovr path; Add: requirements.txt: gcovr version.
1 parent f955e32 commit c2f89d1

3 files changed

Lines changed: 16 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ jobs:
178178
coverage:
179179
name: Code Coverage
180180
runs-on: ubuntu-22.04
181-
181+
182182
steps:
183183
- name: Checkout code
184184
uses: actions/checkout@v4
@@ -196,13 +196,24 @@ jobs:
196196
libgtest-dev \
197197
libsqlite3-dev \
198198
gettext-base
199-
199+
200200
cd /tmp
201201
git clone --depth 1 https://github.com/yhirose/cpp-httplib.git
202202
cd cpp-httplib
203203
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
204204
sudo cmake --build build --target install
205205
206+
- name: Set up Python
207+
uses: actions/setup-python@v5
208+
with:
209+
python-version: '3.13'
210+
211+
212+
- name: Install gcovr
213+
run: |
214+
python -m pip install --upgrade pip
215+
pip install gcovr
216+
206217
- name: Configure CMake with coverage
207218
run: |
208219
cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug \
@@ -245,10 +256,6 @@ jobs:
245256
--print-summary \
246257
--sort-uncovered
247258
248-
- name: Set up Python
249-
uses: actions/setup-python@v5
250-
with:
251-
python-version: '3.13'
252259
253260
- name: Install Python dependencies
254261
run: |

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ VENV=.venv-netnet
1818
PYTHON=$(VENV)/bin/python3
1919
PIP=$(VENV)/bin/pip
2020
PYTEST=$(VENV)/bin/pytest
21+
GCOVR=$(VENV)/bin/gcovr
2122

2223
CMAKE ?= cmake
2324
BUILD_DIR ?= build

requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
certifi==2025.10.5
22
charset-normalizer==3.4.4
3+
gcovr==8.4
34
idna==3.11
45
iniconfig==2.3.0
56
packaging==25.0
@@ -9,5 +10,4 @@ pytest==8.4.2
910
PyYAML==6.0.3
1011
requests==2.32.4
1112
scapy==2.6.1
12-
urllib3==2.5.0
13-
13+
urllib3==2.5.0

0 commit comments

Comments
 (0)