From 6019a37dde6f719fceb78f868258927e04ae16c2 Mon Sep 17 00:00:00 2001 From: Alastair Robertson Date: Wed, 24 May 2023 08:14:19 -0700 Subject: [PATCH] CodeCov: Collect coverage from all source files The "src" directory got renamed to "oi" and the previous rule stopped matching our source code. By changing to collect coverage for everything except for "build" and "extern", we should avoid this problem in the future. --- .circleci/config.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3a88a06..827b7b3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -188,8 +188,10 @@ jobs: name: Code Coverage when: always command: | - lcov --directory . --capture --rc lcov_branch_coverage=1 --output-file coverage.info - lcov --extract coverage.info '/tmp/object-introspection/src/*' '/tmp/object-introspection/include/*' --rc lcov_branch_coverage=1 --output-file coverage.info + lcov --capture --directory . --rc lcov_branch_coverage=1 --output-file coverage.info + # Empirically, extract-then-remove is faster than remove-then-extract + lcov --extract coverage.info '/tmp/object-introspection/*' --rc lcov_branch_coverage=1 --output-file coverage.info + lcov --remove coverage.info '/tmp/object-introspection/build/*' '/tmp/object-introspection/extern/*' --rc lcov_branch_coverage=1 --output-file coverage.info lcov --list --rc lcov_branch_coverage=1 coverage.info curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import