Skip to content

Commit c573a7b

Browse files
authored
Merge pull request #98 from sir-gon/develop
[CONFIG] [Github Actions] coverage script minimal fixes.
2 parents cb73688 + c8a3576 commit c573a7b

2 files changed

Lines changed: 15 additions & 5 deletions

File tree

.github/workflows/c-coverage.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
- name: Install Tools
2222
run: |
23-
sudo apt update
23+
sudo apt-get update
2424
sudo apt-get install lcov
2525
2626
- name: Check Tools
@@ -34,17 +34,18 @@ jobs:
3434
run: |
3535
make dependencies
3636
37-
# yamllint disable rule:line-length
3837
- name: Build
3938
run: |
4039
export VCPKG_ROOT=/usr/local/share/vcpkg
4140
make build
42-
# yamllint enable rule:line-length
41+
4342
- name: Test / Coverage
4443
run: make coverage
4544

45+
# yamllint disable rule:line-length
4646
- name: Upload coverage reports to Codecov with GitHub Action
47-
uses: codecov/codecov-action@v6
47+
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
48+
# yamllint enable rule:line-length
4849
with:
4950
directory: ./coverage
5051
files: coverage/lcov.info

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ FILES := $(shell find $(SRC_DIR) -name '*.cpp' -o -name '*.c' -o -name '*.h' -o
3434
.PHONY: all clean dependencies help list test outdated
3535
.EXPORT_ALL_VARIABLES: # (2)
3636

37+
define crono
38+
@start=$$(date +%s); \
39+
$(1); \
40+
end=$$(date +%s); \
41+
diff=$$((end - start)); \
42+
printf "Total time: %02d:%02d:%02d\n" $$((diff/3600)) $$((diff%3600/60)) $$((diff%60))
43+
endef
44+
3745
help: list
3846

3947
list:
@@ -143,7 +151,8 @@ compose/run: compose/build
143151

144152
compose/all: compose/rebuild compose/test compose/lint
145153

146-
all: env dependencies test lint
154+
all:
155+
$(call crono, make clean; make dependencies; make build; make test; make lint; make coverage/html)
147156

148157
run:
149158
ls -alh

0 commit comments

Comments
 (0)