@@ -24,11 +24,14 @@ jobs:
2424 # Spin up UI on 127.0.0.1 to avoid host resolution issues in e2e tests with Node 18+
2525 DSPACE_UI_HOST : 127.0.0.1
2626 DSPACE_UI_PORT : 4000
27+ DSPACE_UI_BASEURL : http://127.0.0.1:4000
2728 # Ensure all SSR caching is disabled in test environment
2829 DSPACE_CACHE_SERVERSIDE_BOTCACHE_MAX : 0
2930 DSPACE_CACHE_SERVERSIDE_ANONYMOUSCACHE_MAX : 0
3031 # Tell Cypress to run e2e tests using the same UI URL
3132 CYPRESS_BASE_URL : http://127.0.0.1:4000
33+ # Disable the cookie consent banner in e2e tests to avoid errors because of elements hidden by it
34+ DSPACE_INFO_ENABLECOOKIECONSENTPOPUP : false
3235 # When Chrome version is specified, we pin to a specific version of Chrome
3336 # Comment this out to use the latest release
3437 # CHROME_VERSION: "116.0.5845.187-1"
@@ -49,11 +52,11 @@ jobs:
4952 steps :
5053 # https://github.com/actions/checkout
5154 - name : Checkout codebase
52- uses : actions/checkout@v4
55+ uses : actions/checkout@v6
5356
5457 # https://github.com/actions/setup-node
5558 - name : Install Node.js ${{ matrix.node-version }}
56- uses : actions/setup-node@v4
59+ uses : actions/setup-node@v6
5760 with :
5861 node-version : ${{ matrix.node-version }}
5962
7881 id : yarn-cache-dir-path
7982 run : echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
8083 - name : Cache Yarn dependencies
81- uses : actions/cache@v4
84+ uses : actions/cache@v5
8285 with :
8386 # Cache entire Yarn cache directory (see previous step)
8487 path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -105,16 +108,21 @@ jobs:
105108 # so that it can be shared with the 'codecov' job (see below)
106109 # NOTE: Angular CLI only supports code coverage for specs. See https://github.com/angular/angular-cli/issues/6286
107110 - name : Upload code coverage report to Artifact
108- uses : actions/upload-artifact@v4
111+ uses : actions/upload-artifact@v7
109112 if : matrix.node-version == '18.x'
110113 with :
111114 name : coverage-report-${{ matrix.node-version }}
112115 path : ' coverage/dspace-angular/lcov.info'
113116 retention-days : 14
114117
115- # Login to our Docker registry, so that we can access private Docker images using "docker compose" below.
118+ # Login to our Docker registry, so that we can access Docker images using "docker compose" below.
119+ # This login is required on the upstream repository because DOCKER_REGISTRY is set to ghcr.io
120+ # and pulling ghcr.io/dspace/* requires authentication. On forks, DOCKER_REGISTRY falls back to
121+ # docker.io (see env block above) where the same images are publicly pullable without a login,
122+ # and forks cannot authenticate against ghcr.io/dspace/* with their own GITHUB_TOKEN anyway.
116123 - name : Login to ${{ env.DOCKER_REGISTRY }}
117- uses : docker/login-action@v3
124+ uses : docker/login-action@v4
125+ if : github.repository == 'dspace/dspace-angular'
118126 with :
119127 registry : ${{ env.DOCKER_REGISTRY }}
120128 username : ${{ github.repository_owner }}
@@ -132,7 +140,7 @@ jobs:
132140 # https://github.com/cypress-io/github-action
133141 # (NOTE: to run these e2e tests locally, just use 'ng e2e')
134142 - name : Run e2e tests (integration tests)
135- uses : cypress-io/github-action@v6
143+ uses : cypress-io/github-action@v7.1.9
136144 with :
137145 # Run tests in Chrome, headless mode (default)
138146 browser : chrome
@@ -147,7 +155,7 @@ jobs:
147155 # Cypress always creates a video of all e2e tests (whether they succeeded or failed)
148156 # Save those in an Artifact
149157 - name : Upload e2e test videos to Artifacts
150- uses : actions/upload-artifact@v4
158+ uses : actions/upload-artifact@v7
151159 if : always()
152160 with :
153161 name : e2e-test-videos-${{ matrix.node-version }}
@@ -156,7 +164,7 @@ jobs:
156164 # If e2e tests fail, Cypress creates a screenshot of what happened
157165 # Save those in an Artifact
158166 - name : Upload e2e test failure screenshots to Artifacts
159- uses : actions/upload-artifact@v4
167+ uses : actions/upload-artifact@v7
160168 if : failure()
161169 with :
162170 name : e2e-test-screenshots-${{ matrix.node-version }}
@@ -203,22 +211,25 @@ jobs:
203211 codecov :
204212 # Must run after 'tests' job above
205213 needs : tests
214+ # Only run on the upstream repository: forks do not have the CODECOV_TOKEN secret,
215+ # and Codecov refuses to create a commit on a protected branch without a token.
216+ if : github.repository == 'dspace/dspace-angular'
206217 runs-on : ubuntu-latest
207218 steps :
208219 - name : Checkout
209- uses : actions/checkout@v4
220+ uses : actions/checkout@v6
210221
211222 # Download artifacts from previous 'tests' job
212223 - name : Download coverage artifacts
213- uses : actions/download-artifact@v4
224+ uses : actions/download-artifact@v8
214225
215226 # Now attempt upload to Codecov using its action.
216227 # NOTE: We use a retry action to retry the Codecov upload if it fails the first time.
217228 #
218229 # Retry action: https://github.com/marketplace/actions/retry-action
219230 # Codecov action: https://github.com/codecov/codecov-action
220231 - name : Upload coverage to Codecov.io
221- uses : Wandalen/wretry.action@v1.3 .0
232+ uses : Wandalen/wretry.action@v3.8 .0
222233 with :
223234 action : codecov/codecov-action@v4
224235 # Ensure codecov-action throws an error when it fails to upload
0 commit comments