Skip to content

Commit 6e15de1

Browse files
committed
Update codecov configuration to upload tests
1 parent 1617ac5 commit 6e15de1

2 files changed

Lines changed: 24 additions & 34 deletions

File tree

.github/workflows/build.yml

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -121,39 +121,35 @@ jobs:
121121
shell: bash
122122
run: ./mvnw -B -U clean verify
123123

124-
- name: Upload to codecov
124+
- name: Publish code coverage to Codecov
125125
uses: codecov/codecov-action@v5
126+
continue-on-error: true
127+
if: ${{ ! cancelled() }}
126128
with:
127-
name: tests-java-${{ matrix.java-version }}-os-${{ matrix.os-name }}
129+
flags: java-${{ matrix.java-version }}-${{ matrix.os-name }}
130+
report_type: coverage
128131
token: ${{ secrets.CODECOV_TOKEN }}
129132

130-
- name: Stash reports
131-
uses: actions/upload-artifact@v6
132-
if: always()
133+
- name: Publish test results to Codecov
134+
uses: codecov/codecov-action@v5
135+
if: ${{ ! cancelled() }}
133136
with:
134-
name: reports-${{ matrix.java-version }}-${{ matrix.os-name }}
135-
if-no-files-found: error
136-
path: |
137-
**/surefire-reports/**
138-
**/failsafe-reports/**
139-
**/build*.log
140-
retention-days: 30
141-
142-
notify-coverage:
143-
name: Notify of coverage
144-
runs-on: ubuntu-latest
145-
timeout-minutes: 30
146-
needs:
147-
- build
148-
steps:
149-
- name: Checkout code
150-
uses: actions/checkout@v6
137+
flags: java-${{ matrix.java-version }}-${{ matrix.os-name }}
138+
report_type: test_results
139+
token: ${{ secrets.CODECOV_TOKEN }}
151140

152-
- name: Publish code coverage
153-
uses: codecov/codecov-action@v5
154-
continue-on-error: true
141+
- name: Upload build logs as artifacts
142+
uses: actions/upload-artifact@v6
155143
if: always()
156144
with:
157-
token: ${{ secrets.CODECOV_TOKEN }}
158-
fail_ci_if_error: true
159-
run_command: send-notifications
145+
name: jdk-${{ matrix.java-version }}-${{ matrix.os-name }}
146+
path: |-
147+
**/build.log
148+
**/maven-status/**
149+
**/*-reports/**.txt
150+
**/*-reports/**.xml
151+
**/*.dumpstream
152+
compression-level: 9
153+
retention-days: 7
154+
include-hidden-files: true
155+
if-no-files-found: warn

codecov.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ coverage:
2020
precision: 2
2121

2222
codecov:
23-
notify:
24-
# Notify via a separate pipeline step in CI once all builds have completed. This way, we don't
25-
# report coverage after each parallel build completes, which results in spammy and incorrect
26-
# email notifications and prematurely marking the build as having failed.
27-
# https://github.com/codecov/codecov-action/issues/1436#issuecomment-2614065472
28-
manual_trigger: true
2923
require_ci_to_pass: true
3024
strict_yaml_branch: main
3125

0 commit comments

Comments
 (0)