diff --git a/.c8rc.json b/.c8rc.json index 600995c4f0..700ba627ec 100644 --- a/.c8rc.json +++ b/.c8rc.json @@ -1,4 +1,5 @@ { - "reporter": ["html", "lcov"], - "exclude": ["test/*", "*.mjs", "**/*.mjs"] + "reporter": ["lcov"], + "exclude": ["test/*", "*.mjs", "**/*.mjs"], + "clean": true } diff --git a/.github/workflows/versioned-coverage.yml b/.github/workflows/versioned-coverage.yml index 444d5643fe..b707aa2402 100644 --- a/.github/workflows/versioned-coverage.yml +++ b/.github/workflows/versioned-coverage.yml @@ -34,6 +34,7 @@ jobs: env: VERSIONED_MODE: --major JOBS: 4 # 2 per CPU seems to be the sweet spot in GHA (July 2022) + SKIP_C8: true versioned: runs-on: ubuntu-latest diff --git a/bin/run-versioned-tests.sh b/bin/run-versioned-tests.sh index 654e4c6d99..799d594f2a 100755 --- a/bin/run-versioned-tests.sh +++ b/bin/run-versioned-tests.sh @@ -8,6 +8,7 @@ set -x VERSIONED_MODE="${VERSIONED_MODE:---minor}" SAMPLES="${SAMPLES:-10}" export NODE_OPTIONS="--max-old-space-size=4096" +SKIP_C8="${SKIP_C8:-false}" # Determine context manager for sanity sake if [[ $NEW_RELIC_FEATURE_FLAG_ASYNC_LOCAL_CONTEXT == 1 ]]; @@ -33,15 +34,23 @@ else ) fi -# C8 runs out of heap when running against -# patch/minor flag. We will just skip it -# and figure out another way to get coverage -# when running on main branch. -if [[ $VERSIONED_MODE == '--major' ]]; +# No coverage as env var is true +# set C8 to "" +if [[ "${SKIP_C8}" = "true" ]]; then - C8="c8 -o ./coverage/versioned" -else C8="" +else + # C8 runs out of heap when running against + # patch/minor flag. We will just skip it + # and figure out another way to get coverage + # when running on main branch. + if [[ $VERSIONED_MODE == '--major' ]]; + then + # lcovonly only generates lcov report which will cut down on amount of time generating reports + C8="c8 -o ./coverage/versioned -r lcovonly" + else + C8="" + fi fi export AGENT_PATH=`pwd` @@ -50,6 +59,7 @@ export AGENT_PATH=`pwd` echo "JOBS = ${JOBS}" echo "NPM7 = ${NPM7}" echo "CONTEXT MANAGER = ${CTX_MGR}" +echo "C8 = ${C8}" # if $JOBS is not empy if [ ! -z "$JOBS" ];