43
43
# CHROME_VERSION: "90.0.4430.212-1"
44
44
# Bump Node heap size (OOM in CI after upgrading to Angular 15)
45
45
NODE_OPTIONS : ' --max-old-space-size=4096'
46
+ # Project name to use when running docker compose prior to e2e tests
47
+ COMPOSE_PROJECT_NAME : ' ci'
46
48
strategy :
47
49
# Create a matrix of Node versions to test against (in parallel)
48
50
matrix :
@@ -53,11 +55,11 @@ jobs:
53
55
steps :
54
56
# https://github.com/actions/checkout
55
57
- name : Checkout codebase
56
- uses : actions/checkout@v3
58
+ uses : actions/checkout@v4
57
59
58
60
# https://github.com/actions/setup-node
59
61
- name : Install Node.js ${{ matrix.node-version }}
60
- uses : actions/setup-node@v3
62
+ uses : actions/setup-node@v4
61
63
with :
62
64
node-version : ${{ matrix.node-version }}
63
65
82
84
id : yarn-cache-dir-path
83
85
run : echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
84
86
- name : Cache Yarn dependencies
85
- uses : actions/cache@v3
87
+ uses : actions/cache@v4
86
88
with :
87
89
# Cache entire Yarn cache directory (see previous step)
88
90
path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -112,7 +114,7 @@ jobs:
112
114
uses : actions/upload-artifact@v4
113
115
if : matrix.node-version == '18.x'
114
116
with :
115
- name : dspace-angular coverage report
117
+ name : coverage-report-${{ matrix.node-version }}
116
118
path : ' coverage/dspace-angular/lcov.info'
117
119
retention-days : 14
118
120
@@ -128,7 +130,7 @@ jobs:
128
130
# https://github.com/cypress-io/github-action
129
131
# (NOTE: to run these e2e tests locally, just use 'ng e2e')
130
132
- name : Run e2e tests (integration tests)
131
- uses : cypress-io/github-action@v5
133
+ uses : cypress-io/github-action@v6
132
134
with :
133
135
# Run tests in Chrome, headless mode (default)
134
136
browser : chrome
@@ -146,7 +148,7 @@ jobs:
146
148
uses : actions/upload-artifact@v4
147
149
if : always()
148
150
with :
149
- name : e2e-test-videos
151
+ name : e2e-test-videos-${{ matrix.node-version }}
150
152
path : cypress/videos
151
153
152
154
# If e2e tests fail, Cypress creates a screenshot of what happened
@@ -155,7 +157,7 @@ jobs:
155
157
uses : actions/upload-artifact@v4
156
158
if : failure()
157
159
with :
158
- name : e2e-test-screenshots
160
+ name : e2e-test-screenshots-${{ matrix.node-version }}
159
161
path : cypress/screenshots
160
162
161
163
- name : Stop app (in case it stays up after e2e tests)
@@ -192,31 +194,36 @@ jobs:
192
194
- name : Shutdown Docker containers
193
195
run : docker compose -f ./docker/docker-compose-ci.yml down
194
196
195
- # # Codecov upload is a separate job in order to allow us to restart this separate from the entire build/test
196
- # # job above. This is necessary because Codecov uploads seem to randomly fail at times.
197
- # # See https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954
197
+ # Codecov upload is a separate job in order to allow us to restart this separate from the entire build/test
198
+ # job above. This is necessary because Codecov uploads seem to randomly fail at times.
199
+ # See https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954
198
200
# codecov:
199
201
# # Must run after 'tests' job above
200
202
# needs: tests
201
203
# runs-on: ubuntu-latest
202
204
# steps:
203
205
# - name: Checkout
204
- # uses: actions/checkout@v3
206
+ # uses: actions/checkout@v4
205
207
#
206
208
# # Download artifacts from previous 'tests' job
207
209
# - name: Download coverage artifacts
208
- # uses: actions/download-artifact@v3
210
+ # uses: actions/download-artifact@v4
209
211
#
210
212
# # Now attempt upload to Codecov using its action.
211
213
# # NOTE: We use a retry action to retry the Codecov upload if it fails the first time.
212
214
# #
213
215
# # Retry action: https://github.com/marketplace/actions/retry-action
214
216
# # Codecov action: https://github.com/codecov/codecov-action
215
217
# - name: Upload coverage to Codecov.io
216
- # uses: Wandalen/wretry.action@v1.0.36
218
+ # uses: Wandalen/wretry.action@v1.3.0
217
219
# with:
218
- # action: codecov/codecov-action@v3
219
- # # Try upload 5 times max
220
+ # action: codecov/codecov-action@v4
221
+ # # Ensure codecov-action throws an error when it fails to upload
222
+ # # This allows us to auto-restart the action if an error is thrown
223
+ # with: |
224
+ # fail_ci_if_error: true
225
+ # token: ${{ secrets.CODECOV_TOKEN }}
226
+ # # Try re-running action 5 times max
220
227
# attempt_limit: 5
221
228
# # Run again in 30 seconds
222
229
# attempt_delay: 30000
0 commit comments