From 8731bb43a8eeb3f7fa693d0b42b394b71a38ac0c Mon Sep 17 00:00:00 2001 From: Adam <897017+aSemy@users.noreply.github.com> Date: Fri, 19 Aug 2022 10:17:14 +0200 Subject: [PATCH 01/13] add GHA for maven verify --- .github/workflows/maven.yml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/maven.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 00000000..349aed00 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,39 @@ +name: Java CI + + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + + +# This allows a subsequently queued workflow run to interrupt previous runs +concurrency: + group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" + cancel-in-progress: true + + +jobs: + maven-verify: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: "17" + distribution: "adopt" + + - name: Cache local Maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Maven Verify + run: ./mvnw --batch-mode --update-snapshots verify From a3f2ba342ccff02e7f2cd7d91c4986552616b371 Mon Sep 17 00:00:00 2001 From: Adam <897017+aSemy@users.noreply.github.com> Date: Fri, 19 Aug 2022 10:19:36 +0200 Subject: [PATCH 02/13] add GHA for maven verify --- .github/workflows/{maven.yml => java-ci.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{maven.yml => java-ci.yml} (100%) diff --git a/.github/workflows/maven.yml b/.github/workflows/java-ci.yml similarity index 100% rename from .github/workflows/maven.yml rename to .github/workflows/java-ci.yml From 8c702b2cf94b67804816648893f56412b1e2aa29 Mon Sep 17 00:00:00 2001 From: Adam <897017+aSemy@users.noreply.github.com> Date: Fri, 19 Aug 2022 10:23:11 +0200 Subject: [PATCH 03/13] add test report step --- .github/workflows/java-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/java-ci.yml b/.github/workflows/java-ci.yml index 349aed00..1bbec99d 100644 --- a/.github/workflows/java-ci.yml +++ b/.github/workflows/java-ci.yml @@ -37,3 +37,7 @@ jobs: - name: Maven Verify run: ./mvnw --batch-mode --update-snapshots verify + + - name: Publish Test Report + if: ${{ always() }} + uses: scacap/action-surefire-report@v1 From fe32b130e1a83d65f363451cf9370c234f165651 Mon Sep 17 00:00:00 2001 From: Adam <897017+aSemy@users.noreply.github.com> Date: Fri, 19 Aug 2022 10:46:40 +0200 Subject: [PATCH 04/13] experimenting with some other reporting actions --- .github/workflows/java-ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/java-ci.yml b/.github/workflows/java-ci.yml index 1bbec99d..f33d5f34 100644 --- a/.github/workflows/java-ci.yml +++ b/.github/workflows/java-ci.yml @@ -41,3 +41,16 @@ jobs: - name: Publish Test Report if: ${{ always() }} uses: scacap/action-surefire-report@v1 + + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action@v2 + if: ${{ always() }} + with: + junit_files: "**/surefire-reports/TEST-*.xml" + + - name: Add coverage to PR + id: jacoco + uses: madrapps/jacoco-report@v1 + with: + paths: ${{ github.workspace }}/target/site/jacoco/jacoco.xml + token: ${{ secrets.GITHUB_TOKEN }} From 2892aa64a329a46f5ac69310f1bc674c3aa74566 Mon Sep 17 00:00:00 2001 From: Adam <897017+aSemy@users.noreply.github.com> Date: Fri, 19 Aug 2022 10:54:54 +0200 Subject: [PATCH 05/13] tweaking GHA --- .github/workflows/java-ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/java-ci.yml b/.github/workflows/java-ci.yml index f33d5f34..2df32f3d 100644 --- a/.github/workflows/java-ci.yml +++ b/.github/workflows/java-ci.yml @@ -52,5 +52,12 @@ jobs: id: jacoco uses: madrapps/jacoco-report@v1 with: - paths: ${{ github.workspace }}/target/site/jacoco/jacoco.xml + paths: ./target/site/jacoco/jacoco.xml token: ${{ secrets.GITHUB_TOKEN }} + + - name: Archive Jacoco reports + uses: actions/upload-artifact@v3 + with: + name: jacoco-reports + path: test-coverage/target/site/jacoco-aggregate + retention-days: 28 From 4160140e3822d4e40f07f6f1c9a3631427cd1499 Mon Sep 17 00:00:00 2001 From: Adam <897017+aSemy@users.noreply.github.com> Date: Fri, 19 Aug 2022 10:59:13 +0200 Subject: [PATCH 06/13] tweaking GHA --- .github/workflows/java-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/java-ci.yml b/.github/workflows/java-ci.yml index 2df32f3d..b71817f1 100644 --- a/.github/workflows/java-ci.yml +++ b/.github/workflows/java-ci.yml @@ -52,7 +52,7 @@ jobs: id: jacoco uses: madrapps/jacoco-report@v1 with: - paths: ./target/site/jacoco/jacoco.xml + path: ./target/site/jacoco/jacoco.xml token: ${{ secrets.GITHUB_TOKEN }} - name: Archive Jacoco reports From 9ac2b90511adfa0acfb7608842cf2776a6eb9a09 Mon Sep 17 00:00:00 2001 From: Adam <897017+aSemy@users.noreply.github.com> Date: Fri, 19 Aug 2022 10:59:51 +0200 Subject: [PATCH 07/13] tweaking GHA --- .github/workflows/java-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/java-ci.yml b/.github/workflows/java-ci.yml index b71817f1..7ebb5454 100644 --- a/.github/workflows/java-ci.yml +++ b/.github/workflows/java-ci.yml @@ -39,8 +39,8 @@ jobs: run: ./mvnw --batch-mode --update-snapshots verify - name: Publish Test Report - if: ${{ always() }} uses: scacap/action-surefire-report@v1 + if: ${{ always() }} - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action@v2 @@ -49,8 +49,8 @@ jobs: junit_files: "**/surefire-reports/TEST-*.xml" - name: Add coverage to PR - id: jacoco uses: madrapps/jacoco-report@v1 + if: ${{ always() }} with: path: ./target/site/jacoco/jacoco.xml token: ${{ secrets.GITHUB_TOKEN }} From 81649040f538dde352ef48177274081dbe6e2bb2 Mon Sep 17 00:00:00 2001 From: Adam <897017+aSemy@users.noreply.github.com> Date: Fri, 19 Aug 2022 11:02:05 +0200 Subject: [PATCH 08/13] tweaking GHA --- .github/workflows/java-ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/java-ci.yml b/.github/workflows/java-ci.yml index 7ebb5454..f2f27f8f 100644 --- a/.github/workflows/java-ci.yml +++ b/.github/workflows/java-ci.yml @@ -41,22 +41,27 @@ jobs: - name: Publish Test Report uses: scacap/action-surefire-report@v1 if: ${{ always() }} + continue-on-error: true - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action@v2 if: ${{ always() }} + continue-on-error: true with: junit_files: "**/surefire-reports/TEST-*.xml" - name: Add coverage to PR uses: madrapps/jacoco-report@v1 if: ${{ always() }} + continue-on-error: true with: - path: ./target/site/jacoco/jacoco.xml + path: ${{ github.workspace }}/target/site/jacoco/jacoco.xml token: ${{ secrets.GITHUB_TOKEN }} - name: Archive Jacoco reports uses: actions/upload-artifact@v3 + if: ${{ always() }} + continue-on-error: true with: name: jacoco-reports path: test-coverage/target/site/jacoco-aggregate From ff6c15e859e0fdae660b1517c1cf22eedbae1c86 Mon Sep 17 00:00:00 2001 From: Adam <897017+aSemy@users.noreply.github.com> Date: Fri, 19 Aug 2022 11:07:38 +0200 Subject: [PATCH 09/13] rm broken/buggy test report actions --- .github/workflows/java-ci.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.github/workflows/java-ci.yml b/.github/workflows/java-ci.yml index f2f27f8f..bc2e59ee 100644 --- a/.github/workflows/java-ci.yml +++ b/.github/workflows/java-ci.yml @@ -38,11 +38,6 @@ jobs: - name: Maven Verify run: ./mvnw --batch-mode --update-snapshots verify - - name: Publish Test Report - uses: scacap/action-surefire-report@v1 - if: ${{ always() }} - continue-on-error: true - - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action@v2 if: ${{ always() }} @@ -50,14 +45,6 @@ jobs: with: junit_files: "**/surefire-reports/TEST-*.xml" - - name: Add coverage to PR - uses: madrapps/jacoco-report@v1 - if: ${{ always() }} - continue-on-error: true - with: - path: ${{ github.workspace }}/target/site/jacoco/jacoco.xml - token: ${{ secrets.GITHUB_TOKEN }} - - name: Archive Jacoco reports uses: actions/upload-artifact@v3 if: ${{ always() }} From a26172e76b510bd7e776493969fe8af882cce3f4 Mon Sep 17 00:00:00 2001 From: Adam <897017+aSemy@users.noreply.github.com> Date: Fri, 19 Aug 2022 11:13:49 +0200 Subject: [PATCH 10/13] try fixing jacoco report --- .github/workflows/java-ci.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/java-ci.yml b/.github/workflows/java-ci.yml index bc2e59ee..4af0dd04 100644 --- a/.github/workflows/java-ci.yml +++ b/.github/workflows/java-ci.yml @@ -45,11 +45,8 @@ jobs: with: junit_files: "**/surefire-reports/TEST-*.xml" - - name: Archive Jacoco reports + - name: Upload JaCoCo coverage report as a workflow artifact uses: actions/upload-artifact@v3 - if: ${{ always() }} - continue-on-error: true with: - name: jacoco-reports - path: test-coverage/target/site/jacoco-aggregate - retention-days: 28 + name: jacoco-report + path: target/site/jacoco/ From f464f4dbee9f24bdc9033caf5778098e1be81a6b Mon Sep 17 00:00:00 2001 From: Adam <897017+aSemy@users.noreply.github.com> Date: Fri, 19 Aug 2022 11:27:31 +0200 Subject: [PATCH 11/13] rm jacoco report upload --- .github/workflows/java-ci.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/java-ci.yml b/.github/workflows/java-ci.yml index 4af0dd04..9a55f013 100644 --- a/.github/workflows/java-ci.yml +++ b/.github/workflows/java-ci.yml @@ -44,9 +44,3 @@ jobs: continue-on-error: true with: junit_files: "**/surefire-reports/TEST-*.xml" - - - name: Upload JaCoCo coverage report as a workflow artifact - uses: actions/upload-artifact@v3 - with: - name: jacoco-report - path: target/site/jacoco/ From 8f80a2ee4d61c67dbea24eff6e50ba0e46ce1384 Mon Sep 17 00:00:00 2001 From: Adam <897017+aSemy@users.noreply.github.com> Date: Fri, 19 Aug 2022 14:13:19 +0200 Subject: [PATCH 12/13] rm jacoco report upload --- .github/workflows/java-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/java-ci.yml b/.github/workflows/java-ci.yml index 9a55f013..4af0dd04 100644 --- a/.github/workflows/java-ci.yml +++ b/.github/workflows/java-ci.yml @@ -44,3 +44,9 @@ jobs: continue-on-error: true with: junit_files: "**/surefire-reports/TEST-*.xml" + + - name: Upload JaCoCo coverage report as a workflow artifact + uses: actions/upload-artifact@v3 + with: + name: jacoco-report + path: target/site/jacoco/ From 56130e2a547aa255a3fdf0d300c03640fbaa7584 Mon Sep 17 00:00:00 2001 From: Adam <897017+aSemy@users.noreply.github.com> Date: Fri, 19 Aug 2022 14:13:43 +0200 Subject: [PATCH 13/13] rm jacoco report upload --- .github/workflows/java-ci.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/java-ci.yml b/.github/workflows/java-ci.yml index 4af0dd04..9a55f013 100644 --- a/.github/workflows/java-ci.yml +++ b/.github/workflows/java-ci.yml @@ -44,9 +44,3 @@ jobs: continue-on-error: true with: junit_files: "**/surefire-reports/TEST-*.xml" - - - name: Upload JaCoCo coverage report as a workflow artifact - uses: actions/upload-artifact@v3 - with: - name: jacoco-report - path: target/site/jacoco/