Skip to content

chore(deps): bump actions/configure-pages from 5 to 6 #48

chore(deps): bump actions/configure-pages from 5 to 6

chore(deps): bump actions/configure-pages from 5 to 6 #48

Workflow file for this run

---
name: Snapshot
permissions:
contents: read
packages: write
statuses: write
checks: write
on:
push:
branches:
- main
pull_request:
jobs:
test-build:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
packages: write
statuses: write
checks: write
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
java-version: "25"
distribution: "temurin"
cache: "maven"
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Build with Maven
run: >-
mvn -B -ntp -Dstyle.color=always verify
${{ github.event_name != 'pull_request' && '-P sign' || '' }}
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- name: Test Summary
id: test_summary
uses: test-summary/action@v2
with:
paths: |
**/target/surefire-reports/TEST-*.xml
if: always()
- uses: qltysh/qlty-action/coverage@main
if: github.event_name != 'pull_request'
with:
coverage-token: ${{secrets.QLTY_COVERAGE_TOKEN}}
files: "**/target/site/jacoco/jacoco.xml"
- name: Merge JaCoCo reports
run: |
python3 - <<'PYEOF'
import xml.etree.ElementTree as ET, sys
files = [
"mjml-java-core/target/site/jacoco/jacoco.xml",
"mjml-java-resolvers/target/site/jacoco/jacoco.xml",
"mjml-java-spring/target/site/jacoco/jacoco.xml",
]
merged = None
for f in files:
root = ET.parse(f).getroot()
if merged is None:
merged = root
continue
for pkg in root.findall("package"):
merged.append(pkg)
for counter in root.findall("counter"):
ctype = counter.get("type")
existing = merged.find(f"counter[@type='{ctype}']")
if existing is not None:
existing.set("missed", str(int(existing.get("missed")) + int(counter.get("missed"))))
existing.set("covered", str(int(existing.get("covered")) + int(counter.get("covered"))))
else:
merged.append(counter)
import os; os.makedirs("target", exist_ok=True)
ET.ElementTree(merged).write("target/jacoco-merged.xml", xml_declaration=True, encoding="UTF-8")
PYEOF
# generates coverage-report.md and publishes as checkrun
- name: JaCoCo Code Coverage Report
id: jacoco_reporter
uses: PavanMudigonda/jacoco-reporter@v5.1
with:
coverage_results_path: target/jacoco-merged.xml
coverage_report_name: Coverage
coverage_report_title: JaCoCo
github_token: ${{ secrets.GITHUB_TOKEN }}
skip_check_run: false
minimum_coverage: 80
fail_below_threshold: true
publish_only_summary: false
# Publish Coverage Job Summary
- name: Add Jacoco report to workflow run summary
run: |
echo "| Outcome | Value |" >> $GITHUB_STEP_SUMMARY
echo "| --- | --- |" >> $GITHUB_STEP_SUMMARY
echo "| Code Coverage % | ${{ steps.jacoco_reporter.outputs.coverage_percentage }} |" >> $GITHUB_STEP_SUMMARY
echo "| :heavy_check_mark: Number of Lines Covered | ${{ steps.jacoco_reporter.outputs.covered_lines }} |" >> $GITHUB_STEP_SUMMARY
echo "| :x: Number of Lines Missed | ${{ steps.jacoco_reporter.outputs.missed_lines }} |" >> $GITHUB_STEP_SUMMARY
echo "| Total Number of Lines | ${{ steps.jacoco_reporter.outputs.total_lines }} |" >> $GITHUB_STEP_SUMMARY
- name: Publish package to GitHub Packages
if: github.event_name != 'pull_request'
run: mvn -B -ntp -Dstyle.color=always deploy -P github,sign -DskipTests=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}