mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 13:09:21 +01:00
build: update gcovr to 7.2 and codecov config
PR-URL: https://github.com/nodejs/node/pull/54019 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
parent
dcccf9ab9b
commit
20aff2b6ff
@ -60,7 +60,7 @@ jobs:
|
|||||||
- name: Environment Information
|
- name: Environment Information
|
||||||
run: npx envinfo
|
run: npx envinfo
|
||||||
- name: Install gcovr
|
- name: Install gcovr
|
||||||
run: pip install gcovr==4.2
|
run: pip install gcovr==7.2
|
||||||
- name: Build
|
- name: Build
|
||||||
run: make build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn --coverage --without-intl"
|
run: make build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn --coverage --without-intl"
|
||||||
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
|
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
|
||||||
@ -72,7 +72,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
NODE_OPTIONS: --max-old-space-size=8192
|
NODE_OPTIONS: --max-old-space-size=8192
|
||||||
- name: Report C++
|
- name: Report C++
|
||||||
run: cd out && gcovr --gcov-exclude='.*\b(deps|usr|out|obj|cctest|embedding)\b' -v -r Release/obj.target --xml -o ../coverage/coverage-cxx.xml --root=$(cd ../ && pwd)
|
run: gcovr --object-directory=out -v --filter src --xml -o ./coverage/coverage-cxx.xml --root=./ --gcov-executable="llvm-cov-18 gcov"
|
||||||
# Clean temporary output from gcov and c8, so that it's not uploaded:
|
# Clean temporary output from gcov and c8, so that it's not uploaded:
|
||||||
- name: Clean tmp
|
- name: Clean tmp
|
||||||
run: rm -rf coverage/tmp && rm -rf out
|
run: rm -rf coverage/tmp && rm -rf out
|
||||||
|
4
.github/workflows/coverage-linux.yml
vendored
4
.github/workflows/coverage-linux.yml
vendored
@ -60,7 +60,7 @@ jobs:
|
|||||||
- name: Environment Information
|
- name: Environment Information
|
||||||
run: npx envinfo
|
run: npx envinfo
|
||||||
- name: Install gcovr
|
- name: Install gcovr
|
||||||
run: pip install gcovr==4.2
|
run: pip install gcovr==7.2
|
||||||
- name: Build
|
- name: Build
|
||||||
run: make build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn --coverage"
|
run: make build-ci -j4 V=1 CONFIG_FLAGS="--error-on-warn --coverage"
|
||||||
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
|
# TODO(bcoe): fix the couple tests that fail with the inspector enabled.
|
||||||
@ -72,7 +72,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
NODE_OPTIONS: --max-old-space-size=8192
|
NODE_OPTIONS: --max-old-space-size=8192
|
||||||
- name: Report C++
|
- name: Report C++
|
||||||
run: cd out && gcovr --gcov-exclude='.*\b(deps|usr|out|obj|cctest|embedding)\b' -v -r Release/obj.target --xml -o ../coverage/coverage-cxx.xml --root=$(cd ../ && pwd)
|
run: gcovr --object-directory=out -v --filter src --xml -o ./coverage/coverage-cxx.xml --root=./ --gcov-executable="llvm-cov-18 gcov"
|
||||||
# Clean temporary output from gcov and c8, so that it's not uploaded:
|
# Clean temporary output from gcov and c8, so that it's not uploaded:
|
||||||
- name: Clean tmp
|
- name: Clean tmp
|
||||||
run: rm -rf coverage/tmp && rm -rf out
|
run: rm -rf coverage/tmp && rm -rf out
|
||||||
|
9
Makefile
9
Makefile
@ -254,7 +254,7 @@ coverage: coverage-test ## Run the tests and generate a coverage report.
|
|||||||
.PHONY: coverage-build
|
.PHONY: coverage-build
|
||||||
coverage-build: all
|
coverage-build: all
|
||||||
-$(MAKE) coverage-build-js
|
-$(MAKE) coverage-build-js
|
||||||
if [ ! -d gcovr ]; then $(PYTHON) -m pip install -t gcovr gcovr==4.2; fi
|
if [ ! -d gcovr ]; then $(PYTHON) -m pip install -t gcovr gcovr==7.2; fi
|
||||||
$(MAKE)
|
$(MAKE)
|
||||||
|
|
||||||
.PHONY: coverage-build-js
|
.PHONY: coverage-build-js
|
||||||
@ -270,9 +270,10 @@ coverage-test: coverage-build
|
|||||||
-NODE_V8_COVERAGE=coverage/tmp \
|
-NODE_V8_COVERAGE=coverage/tmp \
|
||||||
TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) $(COVTESTS)
|
TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) $(COVTESTS)
|
||||||
$(MAKE) coverage-report-js
|
$(MAKE) coverage-report-js
|
||||||
-(cd out && PYTHONPATH=../gcovr $(PYTHON) -m gcovr \
|
-(PYTHONPATH=./gcovr $(PYTHON) -m gcovr \
|
||||||
--gcov-exclude='.*\b(deps|usr|out|cctest|embedding)\b' -v \
|
--object-directory=out \
|
||||||
-r ../src/ --object-directory Release/obj.target \
|
--filter src -v \
|
||||||
|
--root ./ \
|
||||||
--html --html-details -o ../coverage/cxxcoverage.html \
|
--html --html-details -o ../coverage/cxxcoverage.html \
|
||||||
--gcov-executable="$(GCOV)")
|
--gcov-executable="$(GCOV)")
|
||||||
@printf "Javascript coverage %%: "
|
@printf "Javascript coverage %%: "
|
||||||
|
18
codecov.yml
18
codecov.yml
@ -1,20 +1,16 @@
|
|||||||
# TODO(bcoe): re-enable coverage report comments, once we can figure out
|
comment:
|
||||||
# how to make them more accurate for the Node.js project,
|
# Only show diff and files changed:
|
||||||
# See: https://github.com/nodejs/node/issues/35759
|
layout: diff, files
|
||||||
comment: false
|
# Don't post if no changes in coverage:
|
||||||
# # Only show diff and files changed:
|
require_changes: true
|
||||||
# layout: "diff, files"
|
|
||||||
# # Don't post if no changes in coverage:
|
|
||||||
# require_changes: true
|
|
||||||
|
|
||||||
codecov:
|
codecov:
|
||||||
branch: main
|
|
||||||
notify:
|
notify:
|
||||||
# Wait for all coverage builds:
|
# Wait for all coverage builds:
|
||||||
# - coverage-linux.yml
|
# - coverage-linux.yml
|
||||||
# - coverage-windows.yml
|
# - coverage-windows.yml [manually disabled see #50489]
|
||||||
# - coverage-linux-without-intl.yml
|
# - coverage-linux-without-intl.yml
|
||||||
after_n_builds: 3
|
after_n_builds: 2
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
# Useful for blocking Pull Requests that don't meet a particular coverage threshold.
|
# Useful for blocking Pull Requests that don't meet a particular coverage threshold.
|
||||||
|
Loading…
Reference in New Issue
Block a user