Skip to content

Commit c0d7640

Browse files
committed
Make CI green again
Restore Gradle CI files to last known green builds. Switch to work on the `gradle-coverage-report` branch.
1 parent 71d7b88 commit c0d7640

File tree

2 files changed

+7
-40
lines changed

2 files changed

+7
-40
lines changed

.github/workflows/ci-earthly-gradle.yml

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -64,38 +64,9 @@ jobs:
6464
- name: Execute run script
6565
run: earthly --secret OWASP_NVD_API_KEY +run-with-gradle
6666

67-
# Save artifacts for build
68-
# See Earthfile that copies these from container to local
69-
70-
# Javadoc HTML and jars
71-
72-
- name: Save Javadoc HTML for main
73-
uses: actions/upload-artifact@v4
74-
with:
75-
name: javadoc-html-main
76-
if-no-files-found: error
77-
path: build/docs/javadoc/
78-
79-
- name: Save Javadoc HTML Jar for main
80-
uses: actions/upload-artifact@v4
81-
with:
82-
name: javadoc-jar-main
83-
if-no-files-found: error
84-
path: build/libs/modern-java-practices-0-SNAPSHOT-javadoc.jar
85-
86-
# Coverage badge report
87-
8867
- name: Save coverage report
8968
uses: actions/upload-artifact@v4
9069
with:
9170
name: coverage-report
9271
if-no-files-found: error
9372
path: build/reports/jacoco/test/
94-
95-
# Experiment if GitHub automatically shows coverage directly for run result
96-
- name: Show coverage in GitHub action run result page
97-
uses: actions/upload-artifact@v4
98-
with:
99-
name: jacoco-summary
100-
if-no-files-found: error
101-
path: build/reports/jacoco/test/jacocoTestReport.csv

Earthfile

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@ run-with-gradle:
1717
COPY run-with-gradle.sh .
1818
RUN ./run-with-gradle.sh
1919

20-
# For CI so that GitHub can copy artifacts
21-
20+
# For CI so that GitHub can copy artifacts
2221
# Coverage reports
22+
SAVE ARTIFACT --keep-ts build/reports/jacoco/test/ AS LOCAL build/reports/jacoco/test/
23+
# Javadocs and jars
24+
SAVE ARTIFACT --keep-ts build/libs/modern-java-practices-0-javadoc.jar
25+
SAVE ARTIFACT --keep-ts build/docs/javadoc/ AS LOCAL build/docs/javadoc/
26+
2327
# Test coverage and badge for Gradle:
2428
# You need to PICK ONE from Gradle or Maven for your build.
2529
# This project uses Maven (see below) to create the code coverage badge to
@@ -28,12 +32,7 @@ run-with-gradle:
2832
# Gradle.
2933
# After this enabling this, you still need to update the GitHub action steps
3034
# to generate the badge using a custom path to the CVS report.
31-
SAVE ARTIFACT --keep-ts build/reports/jacoco/test/ AS LOCAL build/reports/jacoco/test/
32-
SAVE ARTIFACT --keep-ts build/reports/jacoco/test/jacocoTestReport.csv AS LOCAL build/reports/jacoco/test/jacocoTestReport.csv
33-
34-
# Javadocs and jars
35-
SAVE ARTIFACT --keep-ts build/libs/modern-java-practices-0-javadoc.jar
36-
SAVE ARTIFACT --keep-ts build/docs/javadoc/ AS LOCAL build/docs/javadoc/
35+
# SAVE ARTIFACT --save-ts build/reports/jacoco/test/jacocoTestReport.csv AS LOCAL build/reports/jacoco/test/jacocoTestReport.csv
3736

3837
build-with-maven:
3938
COPY mvnw .
@@ -56,9 +55,6 @@ build-with-maven:
5655
# See above comments on enabling for Gradle.
5756
# Note that ONLY the Maven containerized build updates the README frontpage
5857
# badge for coverage. This is to avoid multiple updating.
59-
#
60-
# ALSO NOTE: This seems to enable GitHub action to show coverage directly in
61-
# an action build run.
6258
SAVE ARTIFACT --keep-ts target/site/jacoco/jacoco.csv AS LOCAL target/site/jacoco/jacoco.csv
6359

6460
run-with-maven:

0 commit comments

Comments
 (0)