@@ -33,21 +33,23 @@ jobs:
3333 # CHROME_VERSION: "90.0.4430.212-1"
3434 # Bump Node heap size (OOM in CI after upgrading to Angular 15)
3535 NODE_OPTIONS : ' --max-old-space-size=4096'
36+ # Project name to use when running "docker compose" prior to e2e tests
37+ COMPOSE_PROJECT_NAME : ' ci'
3638 strategy :
3739 # Create a matrix of Node versions to test against (in parallel)
3840 matrix :
39- node-version : [16 .x, 18 .x]
41+ node-version : [18 .x, 20 .x]
4042 # Do NOT exit immediately if one matrix job fails
4143 fail-fast : false
4244 # These are the actual CI steps to perform per job
4345 steps :
4446 # https://github.com/actions/checkout
4547 - name : Checkout codebase
46- uses : actions/checkout@v3
48+ uses : actions/checkout@v4
4749
4850 # https://github.com/actions/setup-node
4951 - name : Install Node.js ${{ matrix.node-version }}
50- uses : actions/setup-node@v3
52+ uses : actions/setup-node@v4
5153 with :
5254 node-version : ${{ matrix.node-version }}
5355
7274 id : yarn-cache-dir-path
7375 run : echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
7476 - name : Cache Yarn dependencies
75- uses : actions/cache@v3
77+ uses : actions/cache@v4
7678 with :
7779 # Cache entire Yarn cache directory (see previous step)
7880 path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
@@ -99,26 +101,26 @@ jobs:
99101 # so that it can be shared with the 'codecov' job (see below)
100102 # NOTE: Angular CLI only supports code coverage for specs. See https://github.com/angular/angular-cli/issues/6286
101103 - name : Upload code coverage report to Artifact
102- uses : actions/upload-artifact@v3
104+ uses : actions/upload-artifact@v4
103105 if : matrix.node-version == '18.x'
104106 with :
105- name : dspace-angular coverage report
107+ name : coverage-report-${{ matrix.node-version }}
106108 path : ' coverage/dspace-angular/lcov.info'
107109 retention-days : 14
108110
109- # Using docker- compose start backend using CI configuration
111+ # Using " docker compose" start backend using CI configuration
110112 # and load assetstore from a cached copy
111113 - name : Start DSpace REST Backend via Docker (for e2e tests)
112114 run : |
113- docker- compose -f ./docker/docker-compose-ci.yml up -d
114- docker- compose -f ./docker/cli.yml -f ./docker/cli.assetstore.yml run --rm dspace-cli
115+ docker compose -f ./docker/docker-compose-ci.yml up -d
116+ docker compose -f ./docker/cli.yml -f ./docker/cli.assetstore.yml run --rm dspace-cli
115117 docker container ls
116118
117119 # Run integration tests via Cypress.io
118120 # https://github.com/cypress-io/github-action
119121 # (NOTE: to run these e2e tests locally, just use 'ng e2e')
120122 - name : Run e2e tests (integration tests)
121- uses : cypress-io/github-action@v5
123+ uses : cypress-io/github-action@v6
122124 with :
123125 # Run tests in Chrome, headless mode (default)
124126 browser : chrome
@@ -133,19 +135,19 @@ jobs:
133135 # Cypress always creates a video of all e2e tests (whether they succeeded or failed)
134136 # Save those in an Artifact
135137 - name : Upload e2e test videos to Artifacts
136- uses : actions/upload-artifact@v3
138+ uses : actions/upload-artifact@v4
137139 if : always()
138140 with :
139- name : e2e-test-videos
141+ name : e2e-test-videos-${{ matrix.node-version }}
140142 path : cypress/videos
141143
142144 # If e2e tests fail, Cypress creates a screenshot of what happened
143145 # Save those in an Artifact
144146 - name : Upload e2e test failure screenshots to Artifacts
145- uses : actions/upload-artifact@v3
147+ uses : actions/upload-artifact@v4
146148 if : failure()
147149 with :
148- name : e2e-test-screenshots
150+ name : e2e-test-screenshots-${{ matrix.node-version }}
149151 path : cypress/screenshots
150152
151153 - name : Stop app (in case it stays up after e2e tests)
@@ -180,7 +182,7 @@ jobs:
180182 run : kill -9 $(lsof -t -i:4000)
181183
182184 - name : Shutdown Docker containers
183- run : docker- compose -f ./docker/docker-compose-ci.yml down
185+ run : docker compose -f ./docker/docker-compose-ci.yml down
184186
185187 # Codecov upload is a separate job in order to allow us to restart this separate from the entire build/test
186188 # job above. This is necessary because Codecov uploads seem to randomly fail at times.
@@ -191,22 +193,27 @@ jobs:
191193 runs-on : ubuntu-latest
192194 steps :
193195 - name : Checkout
194- uses : actions/checkout@v3
196+ uses : actions/checkout@v4
195197
196198 # Download artifacts from previous 'tests' job
197199 - name : Download coverage artifacts
198- uses : actions/download-artifact@v3
200+ uses : actions/download-artifact@v4
199201
200202 # Now attempt upload to Codecov using its action.
201203 # NOTE: We use a retry action to retry the Codecov upload if it fails the first time.
202204 #
203205 # Retry action: https://github.com/marketplace/actions/retry-action
204206 # Codecov action: https://github.com/codecov/codecov-action
205207 - name : Upload coverage to Codecov.io
206- uses : Wandalen/wretry.action@v1.0.36
208+ uses : Wandalen/wretry.action@v1.3.0
207209 with :
208- action : codecov/codecov-action@v3
209- # Try upload 5 times max
210+ action : codecov/codecov-action@v4
211+ # Ensure codecov-action throws an error when it fails to upload
212+ # This allows us to auto-restart the action if an error is thrown
213+ with : |
214+ fail_ci_if_error: true
215+ token: ${{ secrets.CODECOV_TOKEN }}
216+ # Try re-running action 5 times max
210217 attempt_limit : 5
211218 # Run again in 30 seconds
212219 attempt_delay : 30000
0 commit comments