From 73b895ecb76eca052a71cbcb341d4bef5b4d80c0 Mon Sep 17 00:00:00 2001 From: Onkar Hanumante Date: Fri, 26 Jan 2024 00:06:47 +0530 Subject: [PATCH] Skip coverage tests if more than two adapters were modified (#3423) Co-authored-by: onkar hanumante --- .github/workflows/adapter-code-coverage.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/adapter-code-coverage.yml b/.github/workflows/adapter-code-coverage.yml index b4c3f0745d6..b5fbd557bb7 100644 --- a/.github/workflows/adapter-code-coverage.yml +++ b/.github/workflows/adapter-code-coverage.yml @@ -36,8 +36,9 @@ jobs: return "" } const helper = utils.diffHelper({github, context}) - const files = await helper.getDirectories(directoryExtractor) - return files.length == 0 ? "" : JSON.stringify(files); + const directories = await helper.getDirectories(directoryExtractor) + // run coverage for maximum of 2 directories + return (directories.length == 0 || directories.length > 2) ? "" : JSON.stringify(directories) - name: Run coverage tests id: run_coverage