From e81969e4dc85e9eb2b7030f33fad1886712b500b Mon Sep 17 00:00:00 2001 From: Juraj Martinka Date: Tue, 7 Oct 2025 06:16:19 +0200 Subject: [PATCH 1/3] Activate the workflow. --- .github/workflows/coverage-prs-all-components.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/coverage-prs-all-components.yml b/.github/workflows/coverage-prs-all-components.yml index cbc9ff2..76efe65 100644 --- a/.github/workflows/coverage-prs-all-components.yml +++ b/.github/workflows/coverage-prs-all-components.yml @@ -6,13 +6,13 @@ name: Coverage PRs - ALL components on: # NOTE: don't activate this by default because it could conflict with the other job ('only changed components') - # pull_request: - # branches: - # - master - # paths: - # - 'calculator-1/src/**' - # - 'calculator-2/src/**' - # - 'calculator-3/src/**' + pull_request: + branches: + - master + paths: + - 'calculator-1/src/**' + - 'calculator-2/src/**' + - 'calculator-3/src/**' jobs: From 13499587bd3653a22c2570f826d10abf1a138dc1 Mon Sep 17 00:00:00 2001 From: Juraj Martinka Date: Tue, 7 Oct 2025 06:16:30 +0200 Subject: [PATCH 2/3] add uncovered square function. --- .../src/main/java/com/codescene/calculator1/Calculator.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/calculator-1/src/main/java/com/codescene/calculator1/Calculator.java b/calculator-1/src/main/java/com/codescene/calculator1/Calculator.java index 0ff2fbe..40f6e5c 100644 --- a/calculator-1/src/main/java/com/codescene/calculator1/Calculator.java +++ b/calculator-1/src/main/java/com/codescene/calculator1/Calculator.java @@ -37,4 +37,7 @@ private double subtract(double firstOperand, double secondOperand) { private double add(double firstOperand, double secondOperand) { return firstOperand + secondOperand; } + private double square(double x) { + return x * x; + } } From 51dc4c3940f899ff4a4b0ac3c463829f526dddd9 Mon Sep 17 00:00:00 2001 From: Juraj Martinka Date: Tue, 7 Oct 2025 06:22:55 +0200 Subject: [PATCH 3/3] Disable standard PR workflow for this branch. --- .../coverage-prs-only-changed-components.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/coverage-prs-only-changed-components.yml b/.github/workflows/coverage-prs-only-changed-components.yml index 7d558d4..f5bca30 100644 --- a/.github/workflows/coverage-prs-only-changed-components.yml +++ b/.github/workflows/coverage-prs-only-changed-components.yml @@ -1,13 +1,14 @@ name: Coverage PRs - only changed components on: - pull_request: - branches: - - master - paths: - - 'calculator-1/src/**' - - 'calculator-2/src/**' - - 'calculator-3/src/**' + # NOTE: disabled only in this branch/PR to be able to exercise the "ALL components" workflow. + # pull_request: + # branches: + # - master + # paths: + # - 'calculator-1/src/**' + # - 'calculator-2/src/**' + # - 'calculator-3/src/**' jobs: