diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 9eeff1455f8f..ef213a539937 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -413,10 +413,15 @@ jobs: with: enableOpcache: true jitType: tracing + - name: Generate coverage report + if: ${{ !cancelled() }} + run: make gcovr-xml - uses: codecov/codecov-action@v5 if: ${{ !cancelled() }} with: + disable_search: true fail_ci_if_error: true + files: gcovr.xml token: ${{ secrets.CODECOV_TOKEN }} verbose: true COMMUNITY: diff --git a/build/Makefile.gcov b/build/Makefile.gcov index de85893398cd..d389cecdd192 100644 --- a/build/Makefile.gcov +++ b/build/Makefile.gcov @@ -22,8 +22,12 @@ GCOVR_EXCLUDES = \ 'ext/fileinfo/libmagic/.*' \ 'ext/gd/libgd/.*' \ 'ext/hash/sha3/.*' \ + 'ext/lexbor/lexbor/.*' \ 'ext/mbstring/libmbfl/.*' \ - 'ext/pcre/pcre2lib/.*' + 'ext/pcre/pcre2lib/.*' \ + 'ext/uri/uriparser/.*' + +GCOVR_EXCLUDE_LINES_BY_PATTERN = '.*\b(ZEND_PARSE_PARAMETERS_(START|END|NONE)|Z_PARAM_).*' lcov: lcov-html @@ -49,14 +53,14 @@ gcovr-html: @rm -rf gcovr_html/ @mkdir gcovr_html gcovr -sr . -o gcovr_html/index.html --html --html-details \ - --exclude-directories 'ext/date/lib$$' \ + --exclude-lines-by-pattern $(GCOVR_EXCLUDE_LINES_BY_PATTERN) \ $(foreach lib, $(GCOVR_EXCLUDES), -e $(lib)) gcovr-xml: @echo "Generating gcovr XML" @rm -f gcovr.xml gcovr -sr . -o gcovr.xml --xml \ - --exclude-directories 'ext/date/lib$$' \ + --exclude-lines-by-pattern $(GCOVR_EXCLUDE_LINES_BY_PATTERN) \ $(foreach lib, $(GCOVR_EXCLUDES), -e $(lib)) .PHONY: gcovr-html lcov-html php_lcov.info diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index 4c7648e738cd..000000000000 --- a/codecov.yml +++ /dev/null @@ -1,15 +0,0 @@ -ignore: - # bundled libraries - - "ext/lexbor/lexbor/core" - - "ext/lexbor/lexbor/css" - - "ext/lexbor/lexbor/dom" - - "ext/lexbor/lexbor/encoding" - - "ext/lexbor/lexbor/html" - - "ext/lexbor/lexbor/ns" - - "ext/lexbor/lexbor/ports" - - "ext/lexbor/lexbor/punycode" - - "ext/lexbor/lexbor/tag" - - "ext/lexbor/lexbor/unicode" - - "ext/lexbor/lexbor/url" - - "ext/pcre/pcre2lib" - - "ext/uri/uriparser"