From 9a851fe885263d8a9863b4f456e966fa97799ce8 Mon Sep 17 00:00:00 2001 From: Adam Tornhill Date: Tue, 30 Sep 2025 11:09:09 +0200 Subject: [PATCH 01/12] Add functionality for squaring --- src/main/java/com/codescene/Calculator.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/codescene/Calculator.java b/src/main/java/com/codescene/Calculator.java index 0ec910b..ea1f9b6 100644 --- a/src/main/java/com/codescene/Calculator.java +++ b/src/main/java/com/codescene/Calculator.java @@ -37,4 +37,8 @@ private double subtract(double firstOperand, double secondOperand) { private double add(double firstOperand, double secondOperand) { return firstOperand + secondOperand; } + + private double square(double theNumberToSquare) { + return theNumberToSquare * theNumberToSquare; + } } From 72c28f948f0a3b890f53d0ce0356a77dd3118916 Mon Sep 17 00:00:00 2001 From: Adam Tornhill Date: Tue, 30 Sep 2025 11:12:53 +0200 Subject: [PATCH 02/12] Update POM to Java 8 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index f72bd88..182e413 100644 --- a/pom.xml +++ b/pom.xml @@ -7,8 +7,8 @@ 1.0-SNAPSHOT test-coverage - 6 - 1.6 + 8 + 1.8 From 8d8629b6c446597bb30138dd1fb90cb2b7cd85ea Mon Sep 17 00:00:00 2001 From: Adam Tornhill Date: Tue, 30 Sep 2025 11:14:35 +0200 Subject: [PATCH 03/12] Correct script name --- .github/actions/check-coverage/{acton.yml => action.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/actions/check-coverage/{acton.yml => action.yml} (100%) diff --git a/.github/actions/check-coverage/acton.yml b/.github/actions/check-coverage/action.yml similarity index 100% rename from .github/actions/check-coverage/acton.yml rename to .github/actions/check-coverage/action.yml From 1655e9474f7889531deaca4da4d0de14c7473a2e Mon Sep 17 00:00:00 2001 From: Juraj Martinka Date: Tue, 30 Sep 2025 12:27:17 +0200 Subject: [PATCH 04/12] Add debug output --- .github/workflows/test-run.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-run.yml b/.github/workflows/test-run.yml index ebee5b2..3b8aafb 100644 --- a/.github/workflows/test-run.yml +++ b/.github/workflows/test-run.yml @@ -50,6 +50,8 @@ jobs: with: path: coverage/ # TODO: this reusable action is something we could (should?) share with customers + - name: debug + run: git log $(git rev-parse HEAD) - uses: ./.github/actions/check-coverage # TODO: if all the jobs are skipped (or fail terribly) then we might not have any coverage files # available for further processing, and the check-coverage step will fail @@ -63,4 +65,4 @@ jobs: # Include coverage files from all the artifacts (jobs) # NOTE:: if only one component is analyzed then there's only a single coverage/lcov.info file # not nested as if multiple components: coverage/features.lcov.info/lcov.info, coverage/cloud.worker.lcov.info/lcov.info, etc. - coverage-files: "**/coverage/jacoco.xml" \ No newline at end of file + coverage-files: "**/coverage/jacoco.xml" From 43fcbfae6b8ebc959d75b9a64b2e434f55a377f9 Mon Sep 17 00:00:00 2001 From: Juraj Martinka Date: Tue, 30 Sep 2025 14:23:20 +0200 Subject: [PATCH 05/12] More debugging info. --- .github/workflows/test-run.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-run.yml b/.github/workflows/test-run.yml index 3b8aafb..daedde5 100644 --- a/.github/workflows/test-run.yml +++ b/.github/workflows/test-run.yml @@ -51,7 +51,10 @@ jobs: path: coverage/ # TODO: this reusable action is something we could (should?) share with customers - name: debug - run: git log $(git rev-parse HEAD) + run: | + git log $(git rev-parse HEAD) + git branch + git log $(git branch) - uses: ./.github/actions/check-coverage # TODO: if all the jobs are skipped (or fail terribly) then we might not have any coverage files # available for further processing, and the check-coverage step will fail From 28296db80611be8bd582449c57ef07eb2ad470bd Mon Sep 17 00:00:00 2001 From: Juraj Martinka Date: Tue, 30 Sep 2025 22:58:01 +0200 Subject: [PATCH 06/12] More debugging in github actions - printing environment. --- .github/workflows/test-run.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test-run.yml b/.github/workflows/test-run.yml index daedde5..a51cef0 100644 --- a/.github/workflows/test-run.yml +++ b/.github/workflows/test-run.yml @@ -52,6 +52,7 @@ jobs: # TODO: this reusable action is something we could (should?) share with customers - name: debug run: | + env git log $(git rev-parse HEAD) git branch git log $(git branch) From 19ab0483517fe5d8c61f6ce8973976f9c7ceab9a Mon Sep 17 00:00:00 2001 From: Juraj Martinka Date: Wed, 1 Oct 2025 06:55:55 +0200 Subject: [PATCH 07/12] Add a comment to trigger a new build --- src/main/java/com/codescene/Calculator.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/codescene/Calculator.java b/src/main/java/com/codescene/Calculator.java index ea1f9b6..f89e223 100644 --- a/src/main/java/com/codescene/Calculator.java +++ b/src/main/java/com/codescene/Calculator.java @@ -39,6 +39,7 @@ private double add(double firstOperand, double secondOperand) { } private double square(double theNumberToSquare) { + // tiny change return theNumberToSquare * theNumberToSquare; } } From 2eed09e0e3f522c8e83306bfdbf48992b3dce81f Mon Sep 17 00:00:00 2001 From: Juraj Martinka Date: Wed, 1 Oct 2025 13:58:11 +0200 Subject: [PATCH 08/12] Debugging the coverage check. --- .github/workflows/test-run.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-run.yml b/.github/workflows/test-run.yml index a51cef0..4427478 100644 --- a/.github/workflows/test-run.yml +++ b/.github/workflows/test-run.yml @@ -54,8 +54,8 @@ jobs: run: | env git log $(git rev-parse HEAD) - git branch - git log $(git branch) + + git log ${GITHUB_HEAD_REF} - uses: ./.github/actions/check-coverage # TODO: if all the jobs are skipped (or fail terribly) then we might not have any coverage files # available for further processing, and the check-coverage step will fail From c5110991b2d45eaf8d07100e1b55d46a248f9d12 Mon Sep 17 00:00:00 2001 From: Juraj Martinka Date: Wed, 1 Oct 2025 16:29:58 +0200 Subject: [PATCH 09/12] Debugging the coverage check. --- .github/workflows/test-run.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-run.yml b/.github/workflows/test-run.yml index 4427478..768af6b 100644 --- a/.github/workflows/test-run.yml +++ b/.github/workflows/test-run.yml @@ -55,7 +55,7 @@ jobs: env git log $(git rev-parse HEAD) - git log ${GITHUB_HEAD_REF} + git log "origin/${GITHUB_HEAD_REF}" - uses: ./.github/actions/check-coverage # TODO: if all the jobs are skipped (or fail terribly) then we might not have any coverage files # available for further processing, and the check-coverage step will fail From 724045ebb546a9a6034e5664dad455afe3947a87 Mon Sep 17 00:00:00 2001 From: Juraj Martinka Date: Wed, 1 Oct 2025 16:40:23 +0200 Subject: [PATCH 10/12] Debugging the coverage check. --- .github/workflows/test-run.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test-run.yml b/.github/workflows/test-run.yml index 768af6b..7ea602b 100644 --- a/.github/workflows/test-run.yml +++ b/.github/workflows/test-run.yml @@ -53,8 +53,7 @@ jobs: - name: debug run: | env - git log $(git rev-parse HEAD) - + #git log $(git rev-parse HEAD) git log "origin/${GITHUB_HEAD_REF}" - uses: ./.github/actions/check-coverage # TODO: if all the jobs are skipped (or fail terribly) then we might not have any coverage files From 326a975d0e78a3f65d63135b700b84b03096a7a4 Mon Sep 17 00:00:00 2001 From: Juraj Martinka Date: Thu, 2 Oct 2025 05:09:17 +0200 Subject: [PATCH 11/12] trigger coverage check --- src/main/java/com/codescene/Calculator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/codescene/Calculator.java b/src/main/java/com/codescene/Calculator.java index f89e223..cc50006 100644 --- a/src/main/java/com/codescene/Calculator.java +++ b/src/main/java/com/codescene/Calculator.java @@ -39,7 +39,7 @@ private double add(double firstOperand, double secondOperand) { } private double square(double theNumberToSquare) { - // tiny change + // tiny small change return theNumberToSquare * theNumberToSquare; } } From 1fa872ee94ea65c0ee12ba0763da4223ea6bce3f Mon Sep 17 00:00:00 2001 From: Juraj Martinka Date: Thu, 2 Oct 2025 09:28:26 +0200 Subject: [PATCH 12/12] Trigger PR check. --- src/main/java/com/codescene/Calculator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/codescene/Calculator.java b/src/main/java/com/codescene/Calculator.java index cc50006..f89e223 100644 --- a/src/main/java/com/codescene/Calculator.java +++ b/src/main/java/com/codescene/Calculator.java @@ -39,7 +39,7 @@ private double add(double firstOperand, double secondOperand) { } private double square(double theNumberToSquare) { - // tiny small change + // tiny change return theNumberToSquare * theNumberToSquare; } }