Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix codecov upload for codecov-action v5 #68

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
31 changes: 24 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ on:
pull_request:
branches:
- "*"
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

jobs:
Get-CI-Image-Tag:
Expand Down Expand Up @@ -71,13 +69,32 @@ jobs:
su `id -un 1000` -c 'whoami && java -version &&
echo "build and run tests" && ./gradlew build &&
echo "Publish to Maven Local" && ./gradlew publishToMavenLocal'
- name: Upload Coverage Report
- name: Upload Coverage Report Artifacts
if: contains(matrix.java, '21')
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
uses: actions/upload-artifact@v4
with:
file: ./build/reports/jacoco/test/jacocoTestReport.xml
name: coverage-report-linux-jdk${{ matrix.java }}
path: '**/build/reports/jacoco/test/jacocoTestReport.xml'

linux-codecov-upload:
needs: build-linux
runs-on: ubuntu-24.04
steps:
- name: Download Coverage Report Artifact
uses: actions/download-artifact@v4
with:
name: coverage-report-linux-jdk21
path: ./coverage-reports
- name: Find Coverage Reports
id: find-jacoco-reports
run: |
REPORTS=$(find ./coverage-reports -name "jacocoTestReport.xml" | tr '\n' ',' | sed 's/,$//')
echo "report_files=$REPORTS" >> $GITHUB_OUTPUT
- name: Upload Coverage Report
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ steps.find-jacoco-reports.outputs.report_files }}

build-windows:
needs: [spotless, javadoc]
Expand Down