Skip to content

Commit 1f53410

Browse files
Merge branch 'main' into keyboardSubmission
2 parents 2b88058 + 178ae2a commit 1f53410

455 files changed

Lines changed: 47942 additions & 14661 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@
224224
"@typescript-eslint/no-unsafe-call": "off",
225225
"@typescript-eslint/no-unsafe-argument": "off",
226226
"@typescript-eslint/no-unsafe-return": "off",
227+
"@typescript-eslint/no-redundant-type-constituents": "off",
227228
"@typescript-eslint/restrict-template-expressions": "off",
228229
"@typescript-eslint/require-await": "off",
229230
"@typescript-eslint/no-base-to-string": [

.github/dependabot.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,17 @@ updates:
9696
# Ignore all major version updates for all dependencies. We'll only automate minor/patch updates.
9797
- dependency-name: "*"
9898
update-types: ["version-update:semver-major"]
99+
# Also automatically update all our GitHub actions on the main branch
100+
- package-ecosystem: "github-actions"
101+
directory: "/"
102+
# Monthly dependency updates
103+
schedule:
104+
interval: "monthly"
105+
time: "05:00"
106+
# Allow updates to be delayed for a configurable number of days to mitigate
107+
# some classes of supply chain attacks
108+
cooldown:
109+
default-days: 7
99110
#####################
100111
## dspace-9_x branch
101112
#####################
@@ -187,6 +198,18 @@ updates:
187198
# Ignore all major version updates for all dependencies. We'll only automate minor/patch updates.
188199
- dependency-name: "*"
189200
update-types: ["version-update:semver-major"]
201+
# Also automatically update all our GitHub actions on the dspace-9_x branch
202+
- package-ecosystem: "github-actions"
203+
directory: "/"
204+
target-branch: dspace-9_x
205+
# Monthly dependency updates
206+
schedule:
207+
interval: "monthly"
208+
time: "05:00"
209+
# Allow updates to be delayed for a configurable number of days to mitigate
210+
# some classes of supply chain attacks
211+
cooldown:
212+
default-days: 7
190213
#####################
191214
## dspace-8_x branch
192215
#####################
@@ -277,6 +300,18 @@ updates:
277300
# Ignore all major version updates for all dependencies. We'll only automate minor/patch updates.
278301
- dependency-name: "*"
279302
update-types: ["version-update:semver-major"]
303+
# Also automatically update all our GitHub actions on the dspace-8_x branch
304+
- package-ecosystem: "github-actions"
305+
directory: "/"
306+
target-branch: dspace-8_x
307+
# Monthly dependency updates
308+
schedule:
309+
interval: "monthly"
310+
time: "05:00"
311+
# Allow updates to be delayed for a configurable number of days to mitigate
312+
# some classes of supply chain attacks
313+
cooldown:
314+
default-days: 7
280315
#####################
281316
## dspace-7_x branch
282317
#####################
@@ -362,3 +397,15 @@ updates:
362397
# Ignore all major version updates for all dependencies. We'll only automate minor/patch updates.
363398
- dependency-name: "*"
364399
update-types: ["version-update:semver-major"]
400+
# Also automatically update all our GitHub actions on the dspace-7_x branch
401+
- package-ecosystem: "github-actions"
402+
directory: "/"
403+
target-branch: dspace-7_x
404+
# Monthly dependency updates
405+
schedule:
406+
interval: "monthly"
407+
time: "05:00"
408+
# Allow updates to be delayed for a configurable number of days to mitigate
409+
# some classes of supply chain attacks
410+
cooldown:
411+
default-days: 7

.github/workflows/build.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
# Spin up UI on 127.0.0.1 to avoid host resolution issues in e2e tests with Node 20+
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
@@ -51,11 +52,11 @@ jobs:
5152
steps:
5253
# https://github.com/actions/checkout
5354
- name: Checkout codebase
54-
uses: actions/checkout@v4
55+
uses: actions/checkout@v6
5556

5657
# https://github.com/actions/setup-node
5758
- name: Install Node.js ${{ matrix.node-version }}
58-
uses: actions/setup-node@v4
59+
uses: actions/setup-node@v6
5960
with:
6061
node-version: ${{ matrix.node-version }}
6162

@@ -80,7 +81,7 @@ jobs:
8081
id: npm-cache-dir
8182
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
8283
- name: Cache NPM dependencies
83-
uses: actions/cache@v4
84+
uses: actions/cache@v5
8485
with:
8586
# Cache entire NPM cache directory (see previous step)
8687
path: ${{ steps.npm-cache-dir.outputs.dir }}
@@ -113,7 +114,7 @@ jobs:
113114
# so that it can be shared with the 'codecov' job (see below)
114115
# NOTE: Angular CLI only supports code coverage for specs. See https://github.com/angular/angular-cli/issues/6286
115116
- name: Upload code coverage report to Artifact
116-
uses: actions/upload-artifact@v4
117+
uses: actions/upload-artifact@v7
117118
if: matrix.node-version == '20.x'
118119
with:
119120
name: coverage-report-${{ matrix.node-version }}
@@ -155,7 +156,7 @@ jobs:
155156
# Cypress always creates a video of all e2e tests (whether they succeeded or failed)
156157
# Save those in an Artifact
157158
- name: Upload e2e test videos to Artifacts
158-
uses: actions/upload-artifact@v4
159+
uses: actions/upload-artifact@v7
159160
if: always()
160161
with:
161162
name: e2e-test-videos-${{ matrix.node-version }}
@@ -164,7 +165,7 @@ jobs:
164165
# If e2e tests fail, Cypress creates a screenshot of what happened
165166
# Save those in an Artifact
166167
- name: Upload e2e test failure screenshots to Artifacts
167-
uses: actions/upload-artifact@v4
168+
uses: actions/upload-artifact@v7
168169
if: failure()
169170
with:
170171
name: e2e-test-screenshots-${{ matrix.node-version }}
@@ -316,19 +317,19 @@ jobs:
316317
runs-on: ubuntu-latest
317318
steps:
318319
- name: Checkout
319-
uses: actions/checkout@v4
320+
uses: actions/checkout@v6
320321

321322
# Download artifacts from previous 'tests' job
322323
- name: Download coverage artifacts
323-
uses: actions/download-artifact@v4
324+
uses: actions/download-artifact@v8
324325

325326
# Now attempt upload to Codecov using its action.
326327
# NOTE: We use a retry action to retry the Codecov upload if it fails the first time.
327328
#
328329
# Retry action: https://github.com/marketplace/actions/retry-action
329330
# Codecov action: https://github.com/codecov/codecov-action
330331
- name: Upload coverage to Codecov.io
331-
uses: Wandalen/wretry.action@v1.3.0
332+
uses: Wandalen/wretry.action@v3.8.0
332333
with:
333334
action: codecov/codecov-action@v4
334335
# Ensure codecov-action throws an error when it fails to upload

.github/workflows/codescan.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ on:
2525
jobs:
2626
analyze:
2727
name: Analyze Code
28-
runs-on: ubuntu-latest
28+
runs-on: ubuntu-slim
2929
# Limit permissions of this GitHub action. Can only write to security-events
3030
permissions:
3131
actions: read
@@ -35,19 +35,19 @@ jobs:
3535
steps:
3636
# https://github.com/actions/checkout
3737
- name: Checkout repository
38-
uses: actions/checkout@v4
38+
uses: actions/checkout@v6
3939

4040
# Initializes the CodeQL tools for scanning.
4141
# https://github.com/github/codeql-action
4242
- name: Initialize CodeQL
43-
uses: github/codeql-action/init@v3
43+
uses: github/codeql-action/init@v4
4444
with:
4545
languages: javascript
4646

4747
# Autobuild attempts to build any compiled languages
4848
- name: Autobuild
49-
uses: github/codeql-action/autobuild@v3
49+
uses: github/codeql-action/autobuild@v4
5050

5151
# Perform GitHub Code Scanning.
5252
- name: Perform CodeQL Analysis
53-
uses: github/codeql-action/analyze@v3
53+
uses: github/codeql-action/analyze@v4

.github/workflows/docker.yml

Lines changed: 117 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,120 @@ jobs:
5757
# Enable redeploy of sandbox & demo if the branch for this image matches the deployment branch of
5858
# these sites as specified in reusable-docker-build.xml
5959
REDEPLOY_SANDBOX_URL: ${{ secrets.REDEPLOY_SANDBOX_URL }}
60-
REDEPLOY_DEMO_URL: ${{ secrets.REDEPLOY_DEMO_URL }}
60+
REDEPLOY_DEMO_URL: ${{ secrets.REDEPLOY_DEMO_URL }}
61+
62+
#################################################################################
63+
# Test Deployment via Docker to ensure newly built images are working properly
64+
#################################################################################
65+
docker-deploy:
66+
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
67+
if: github.repository == 'dspace/dspace-angular'
68+
runs-on: ubuntu-latest
69+
# Must run after all major images are built
70+
needs: [dspace-angular, dspace-angular-dist]
71+
env:
72+
# Override default dspace.server.url & REST 'host' because backend starts at http://127.0.0.1:8080
73+
dspace__P__server__P__url: http://127.0.0.1:8080/server
74+
DSPACE_REST_HOST: 127.0.0.1
75+
# Override default dspace.ui.url to also use 127.0.0.1.
76+
dspace__P__ui__P__url: http://127.0.0.1:4000
77+
# Override default ui.baseUrl to also use 127.0.0.1. This must match 'dspace.ui.url' for SSR to be enabled.
78+
DSPACE_UI_BASEURL: http://127.0.0.1:4000
79+
steps:
80+
# Checkout our codebase (to get access to Docker Compose scripts)
81+
- name: Checkout codebase
82+
uses: actions/checkout@v6
83+
# Download Docker image artifacts (which were just built by reusable-docker-build.yml)
84+
- name: Download Docker image artifacts
85+
uses: actions/download-artifact@v8
86+
with:
87+
# Download all amd64 Docker images (TAR files) into the /tmp/docker directory
88+
pattern: docker-image-*-linux-amd64
89+
path: /tmp/docker
90+
merge-multiple: true
91+
# Load each of the images into Docker by calling "docker image load" for each.
92+
# This ensures we are using the images just built & not any prior versions on DockerHub
93+
- name: Load all downloaded Docker images
94+
run: |
95+
find /tmp/docker -type f -name "*.tar" -exec docker image load --input "{}" \;
96+
docker image ls -a
97+
# Start backend using our compose script in the codebase.
98+
- name: Start backend in Docker
99+
# MUST use docker.io as we don't have a copy of this backend image in our GitHub Action,
100+
# and docker.io is the only public image. If we ever hit aggressive rate limits at DockerHub,
101+
# we may need to consider making the 'ghcr.io' images public & switch this to 'ghcr.io'
102+
env:
103+
DOCKER_REGISTRY: docker.io
104+
run: |
105+
docker compose -f docker/docker-compose-rest.yml up -d
106+
sleep 10
107+
docker container ls
108+
# Create a test admin account. Load test data from a simple set of AIPs as defined in cli.ingest.yml
109+
- name: Load test data into Backend
110+
run: |
111+
docker compose -f docker/cli.yml run --rm dspace-cli create-administrator -e test@test.edu -f admin -l user -p admin -c en
112+
docker compose -f docker/cli.yml -f docker/cli.ingest.yml run --rm dspace-cli
113+
# Verify backend started successfully.
114+
# 1. Make sure root endpoint is responding (check for dspace.name defined in docker-compose.yml)
115+
# 2. Also check /collections endpoint to ensure the test data loaded properly (check for a collection name in AIPs)
116+
- name: Verify backend is responding properly
117+
run: |
118+
result=$(wget -O- -q http://127.0.0.1:8080/server/api)
119+
echo "$result"
120+
echo "$result" | grep -oE "\"DSpace Started with Docker Compose\""
121+
result=$(wget -O- -q http://127.0.0.1:8080/server/api/core/collections)
122+
echo "$result"
123+
echo "$result" | grep -oE "\"Dog in Yard\""
124+
# Start production frontend using our compose script in the codebase.
125+
- name: Start production frontend in Docker
126+
# Specify the GHCR copy of the production frontend, so that we use the newly built image
127+
env:
128+
DOCKER_REGISTRY: ghcr.io
129+
run: |
130+
docker compose -f docker/docker-compose-dist.yml up -d
131+
sleep 10
132+
docker container ls
133+
# Verify production frontend started successfully.
134+
# 1. Make sure /home path has "DSpace software" (this is in the footer of the page)
135+
# 2. Also check /community-list page lists one of the test Communities in the loaded test data
136+
- name: Verify production frontend is responding properly
137+
run: |
138+
result=$(wget -O- -q http://127.0.0.1:4000/home)
139+
echo "$result"
140+
echo "$result" | grep -oE "\"DSpace software\""
141+
- name: Error logs of production frontend (if error in startup)
142+
if: ${{ failure() }}
143+
run: |
144+
docker compose -f docker/docker-compose-dist.yml logs
145+
# Now shutdown the production frontend image and startup the development frontend image
146+
- name: Shutdown production frontend
147+
run: |
148+
docker compose -f docker/docker-compose-dist.yml down
149+
sleep 10
150+
docker container ls
151+
- name: Startup development frontend
152+
# Specify the GHCR copy of the development frontend, so that we use the newly built image
153+
env:
154+
DOCKER_REGISTRY: ghcr.io
155+
run: |
156+
docker compose -f docker/docker-compose.yml up -d
157+
sleep 10
158+
docker container ls
159+
# Verify development frontend started successfully.
160+
# 1. First, keep requesting the frontend every 10 seconds to wait until its up. Timeout after 10 minutes.
161+
# 2. Once it's responding, check to see if the word "DSpace" appears.
162+
# We cannot check for anything more specific because development mode doesn't have SSR.
163+
- name: Verify development frontend is responding properly
164+
run: |
165+
timeout 10m wget --retry-connrefused -t 0 --waitretry=10 http://127.0.0.1:4000
166+
result=$(wget -O- -q http://127.0.0.1:4000)
167+
echo "$result"
168+
echo "$result" | grep -oE "DSpace"
169+
- name: Error logs of development frontend (if error in startup)
170+
if: ${{ failure() }}
171+
run: |
172+
docker compose -f docker/docker-compose.yml logs
173+
# Shutdown our containers
174+
- name: Shutdown running Docker containers
175+
run: |
176+
docker compose -f docker/docker-compose.yml -f docker/docker-compose-rest.yml down

.github/workflows/issue_opened.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ on:
88
permissions: {}
99
jobs:
1010
automation:
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-slim
1212
steps:
1313
# Add the new issue to a project board, if it needs triage
1414
# See https://github.com/actions/add-to-project
1515
- name: Add issue to triage board
1616
# Only add to project board if issue is flagged as "needs triage" or has no labels
1717
# NOTE: By default we flag new issues as "needs triage" in our issue template
1818
if: (contains(github.event.issue.labels.*.name, 'needs triage') || join(github.event.issue.labels.*.name) == '')
19-
uses: actions/add-to-project@v1.0.0
19+
uses: actions/add-to-project@v1.0.2
2020
# Note, the authentication token below is an ORG level Secret.
2121
# It must be created/recreated manually via a personal access token with admin:org, project, public_repo permissions
2222
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#permissions-for-the-github_token

.github/workflows/label_merge_conflicts.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
triage:
1919
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
2020
if: github.repository == 'dspace/dspace-angular'
21-
runs-on: ubuntu-latest
21+
runs-on: ubuntu-slim
2222
permissions:
2323
pull-requests: write
2424
steps:
@@ -36,4 +36,4 @@ jobs:
3636
conflict_comment: |
3737
Hi @${author},
3838
Conflicts have been detected against the base branch.
39-
Please [resolve these conflicts](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/about-merge-conflicts) as soon as you can. Thanks!
39+
Please [resolve these conflicts](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/about-merge-conflicts) as soon as you can. Thanks!

.github/workflows/port_merged_pull_request.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ permissions:
1818

1919
jobs:
2020
port_pr:
21-
runs-on: ubuntu-latest
21+
runs-on: ubuntu-slim
2222
# Don't run on closed *unmerged* pull requests
2323
if: github.event.pull_request.merged
2424
steps:
2525
# Checkout code
26-
- uses: actions/checkout@v4
26+
- uses: actions/checkout@v6
2727
# Port PR to other branch (ONLY if labeled with "port to")
2828
# See https://github.com/korthout/backport-action
2929
- name: Create backport pull requests
@@ -43,4 +43,4 @@ jobs:
4343
merge_commits: 'skip'
4444
# Use a personal access token (PAT) to create PR as 'dspace-bot' user.
4545
# A PAT is required in order for the new PR to trigger its own actions (for CI checks)
46-
github_token: ${{ secrets.PR_PORT_TOKEN }}
46+
github_token: ${{ secrets.PR_PORT_TOKEN }}

.github/workflows/pull_request_opened.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ permissions:
1616

1717
jobs:
1818
automation:
19-
runs-on: ubuntu-latest
19+
runs-on: ubuntu-slim
2020
steps:
2121
# Assign the PR to whomever created it. This is useful for visualizing assignments on project boards
2222
# See https://github.com/toshimaru/auto-author-assign
2323
- name: Assign PR to creator
24-
uses: toshimaru/auto-author-assign@v2.1.0
24+
uses: toshimaru/auto-author-assign@v3.0.1

0 commit comments

Comments
 (0)