Skip to content

Commit 7f04262

Browse files
authored
Update codecov action to 4.5.0 (#1875)
* Move codecov upload to separate job
1 parent 36ef2db commit 7f04262

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

.github/workflows/maven-build.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,27 @@ jobs:
8585
env:
8686
MAVEN_OPTS: ${{ env.JAVA_11_PLUS_MAVEN_OPTS }}
8787
run: mvn -B clean install -D enable-ci --file pom.xml "-Dsurefire.argLine=--add-opens java.base/java.net=ALL-UNNAMED"
88-
- name: Codecov Report
88+
- name: Save coverage data
8989
if: matrix.os == 'ubuntu' && matrix.java == '17'
90-
uses: codecov/codecov-action@v4
90+
uses: actions/upload-artifact@v4
91+
with:
92+
name: maven-test-target-directory
93+
path: target/
94+
retention-days: 3
95+
codecov-upload:
96+
name: codecov-upload (Upload to codecov.io)
97+
needs: test
98+
runs-on: ubuntu-latest
99+
steps:
100+
- uses: actions/checkout@v4
101+
- uses: actions/download-artifact@v4
102+
with:
103+
name: maven-test-target-directory
104+
path: target
105+
- name: Codecov Report
106+
uses: codecov/[email protected]
91107
with:
108+
# Codecov token from https://app.codecov.io/gh/hub4j/github-api/settings
92109
token: ${{ secrets.CODECOV_TOKEN }}
93110
fail_ci_if_error: true
94111
verbose: true

0 commit comments

Comments
 (0)