.gitea/workflows/gradle-ci.yml aktualisiert
Some checks are pending
Gradle CI with Full Reports / build (push) Has started running

This commit is contained in:
Jan
2025-12-07 15:11:40 +01:00
parent 6c5dfa3170
commit 7e9b4e1c2b

View File

@@ -1,4 +1,4 @@
name: Gradle CI with Jacoco and Problems Report
name: Gradle CI with Full Reports
on:
push:
@@ -11,9 +11,15 @@ jobs:
runs-on: ubuntu-latest
steps:
# -----------------------
# 1. Checkout Repository
# -----------------------
- name: Checkout Repository
uses: actions/checkout@v3
# -----------------------
# 2. Set up Java 17
# -----------------------
- name: Set up Java 17
uses: actions/setup-java@v3
with:
@@ -21,6 +27,9 @@ jobs:
java-version: 17
cache: gradle
# -----------------------
# 3. Cache Gradle Wrapper
# -----------------------
- name: Cache Gradle Wrapper
uses: actions/cache@v3
with:
@@ -28,14 +37,34 @@ jobs:
key: gradle-wrapper-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
# -----------------------
# Build & Test mit Jacoco
# 4. Build & Test mit Logging
# -----------------------
- name: Build & Test with Jacoco
run: |
./gradlew --no-daemon test jacocoTestReport --stacktrace --warning-mode all || true
mkdir -p build/logs
./gradlew --no-daemon test jacocoTestReport --stacktrace --warning-mode all > build/logs/build.log 2>&1 || true
# -----------------------
# Jacoco Artefakte hochladen
# 5. Build Error HTML aus Log erzeugen
# -----------------------
- name: Convert Build Log to HTML
run: |
mkdir -p build/reports/build-errors
echo "<html><body><pre>" > build/reports/build-errors/build-error-report.html
cat build/logs/build.log >> build/reports/build-errors/build-error-report.html
echo "</pre></body></html>" >> build/reports/build-errors/build-error-report.html
# -----------------------
# 6. Upload Test Report (HTML + XML) automatisch
# -----------------------
- name: Upload Test HTML Report
uses: actions/upload-artifact@v3
with:
name: test-html-report
path: build/reports/tests/test
# -----------------------
# 7. Upload Jacoco Reports
# -----------------------
- name: Upload Jacoco HTML Report
uses: actions/upload-artifact@v3
@@ -56,7 +85,7 @@ jobs:
path: build/reports/jacoco/jacoco.csv
# -----------------------
# Gradle Problems Report hochladen
# 8. Upload Problems Report
# -----------------------
- name: Upload Gradle Problems Report
if: always()
@@ -64,3 +93,13 @@ jobs:
with:
name: problems-report
path: build/reports/problems/problems-report.html
# -----------------------
# 9. Upload Build Error HTML Report
# -----------------------
- name: Upload Build Error HTML Report
if: always()
uses: actions/upload-artifact@v3
with:
name: build-error-report
path: build/reports/build-errors/build-error-report.html