Skip to content

Commit 19e3658

Browse files
committed
Use upload-artifact v4 because v3 is deprecated and the action cannot be run
1 parent e9e56b9 commit 19e3658

File tree

1 file changed

+37
-6
lines changed

1 file changed

+37
-6
lines changed

.github/workflows/build.yml

+37-6
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
- dtq-dev
1313
- customer/*
1414
pull_request:
15-
workflow_dispatch:
15+
workflow_dispatch:
1616

1717
permissions:
1818
contents: read # to fetch code (actions/checkout)
@@ -82,13 +82,44 @@ jobs:
8282
# (This artifact is downloadable at the bottom of any job's summary page)
8383
- name: Upload Results of ${{ matrix.type }} to Artifact
8484
if: ${{ failure() }}
85-
uses: actions/upload-artifact@v3
85+
uses: actions/upload-artifact@v4
8686
with:
8787
name: ${{ matrix.type }} results
8888
path: ${{ matrix.resultsdir }}
8989

90-
# https://github.com/codecov/codecov-action
91-
- name: Upload coverage to Codecov.io
92-
uses: codecov/codecov-action@v3
90+
# Upload code coverage report to artifact, so that it can be shared with the 'codecov' job (see below)
91+
- name: Upload code coverage report to Artifact
92+
uses: actions/upload-artifact@v4
9393
with:
94-
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
94+
name: ${{ matrix.type }} coverage report
95+
path: 'dspace/target/site/jacoco-aggregate/jacoco.xml'
96+
retention-days: 14
97+
98+
# # Codecov upload is a separate job in order to allow us to restart this separate from the entire build/test
99+
# # job above. This is necessary because Codecov uploads seem to randomly fail at times.
100+
# # See https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954
101+
# codecov:
102+
# # Must run after 'tests' job above
103+
# needs: tests
104+
# runs-on: ubuntu-latest
105+
# steps:
106+
# - name: Checkout
107+
# uses: actions/checkout@v3
108+
109+
# # Download artifacts from previous 'tests' job
110+
# - name: Download coverage artifacts
111+
# uses: actions/download-artifact@v3
112+
113+
# # Now attempt upload to Codecov using its action.
114+
# # NOTE: We use a retry action to retry the Codecov upload if it fails the first time.
115+
# #
116+
# # Retry action: https://github.com/marketplace/actions/retry-action
117+
# # Codecov action: https://github.com/codecov/codecov-action
118+
# - name: Upload coverage to Codecov.io
119+
# uses: Wandalen/wretry.action@v1.0.36
120+
# with:
121+
# action: codecov/codecov-action@v3
122+
# # Try upload 5 times max
123+
# attempt_limit: 5
124+
# # Run again in 30 seconds
125+
# attempt_delay: 30000

0 commit comments

Comments
 (0)