Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 18 additions & 14 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ on:
merge_group:

permissions:
contents: write
checks: write
contents: read

jobs:

Expand All @@ -34,6 +33,10 @@ jobs:
name: "Java SDK Tests"
needs: smoke-test
if: ${{ always() && needs.smoke-test.result != 'failure' }}
permissions:
contents: write
checks: write
pull-requests: write

runs-on: ubuntu-latest
defaults:
Expand Down Expand Up @@ -94,19 +97,20 @@ jobs:
target/surefire-reports/
retention-days: 1

- name: Generate and commit JaCoCo badge
- name: Generate JaCoCo badge
if: success() && github.ref == 'refs/heads/main'
run: |
.github/scripts/generate-coverage-badge.sh

# Commit if changed
if [[ $(git status --porcelain .github/badges/) ]]; then
git config --global user.name 'github-actions[bot]'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add .github/badges/
git commit -m "Update JaCoCo coverage badge"
git push
fi
run: .github/scripts/generate-coverage-badge.sh

- name: Create PR for JaCoCo badge update
if: success() && github.ref == 'refs/heads/main'
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7
with:
commit-message: "Update JaCoCo coverage badge"
title: "Update JaCoCo coverage badge"
body: "Automated JaCoCo coverage badge update from CI."
branch: auto/update-jacoco-badge
add-paths: .github/badges/
delete-branch: true

- name: Generate Test Report Summary
if: always()
Expand Down