Skip to content

Commit 35175aa

Browse files
Merge pull request #1759 from InformaticsMatters/dev
merge dev to master
2 parents 8f01a9c + 513ce73 commit 35175aa

78 files changed

Lines changed: 2186 additions & 1985 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.

.github/renovate.json

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
23
"dependencyDashboardAutoclose": true,
34
"extends": [
45
":dependencyDashboard",
@@ -17,14 +18,30 @@
1718
"constraints": {
1819
"pnpm": "10"
1920
},
20-
"baseBranches": [
21+
"baseBranchPatterns": [
2122
"dev"
2223
],
24+
"minimumReleaseAge": "2 days",
2325
"packageRules": [
2426
{
25-
"matchPackageNames": [
26-
"!nextjs-routes"
27-
]
27+
"description": "Allow latest squonk packages by ignoring minimum release age",
28+
"matchPackageNames": ["@squonk/**"],
29+
"minimumReleaseAge": null
30+
},
31+
{
32+
"description": "Group Bufbuild packages together",
33+
"matchPackageNames": ["@bufbuild/**"],
34+
"groupName": "Bufbuild monorepo"
35+
},
36+
{
37+
"description": "Group Ketcher packages together",
38+
"matchPackageNames": ["ketcher-*"],
39+
"groupName": "Ketcher monorepo"
40+
},
41+
{
42+
"description": "Keep NodeJS at LTS",
43+
"matchPackageNames": ["node", "@types/node"],
44+
"versioning": "node,"
2845
}
2946
]
3047
}

.github/workflows/lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Setup Node
3535
uses: actions/setup-node@v4
3636
with:
37-
node-version: 22
37+
node-version: 22.21.1
3838
cache: 'pnpm'
3939
- name: Install dependencies
4040
run: pnpm install
@@ -53,7 +53,7 @@ jobs:
5353
- name: Setup Node
5454
uses: actions/setup-node@v4
5555
with:
56-
node-version: 22
56+
node-version: 22.21.1
5757
cache: 'pnpm'
5858
- name: Install dependencies
5959
run: pnpm install --frozen-lockfile

.github/workflows/nextjs_bundle_analysis.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Setup Node
2626
uses: actions/setup-node@v4
2727
with:
28-
node-version: 22
28+
node-version: 22.21.1
2929
cache: 'pnpm'
3030
- name: Install dependencies
3131
run: pnpm install

.github/workflows/release.yml

Lines changed: 49 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,20 @@ permissions:
1010
contents: write
1111
issues: write
1212
pull-requests: write
13+
id-token: write
14+
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: true
1318

1419
jobs:
1520
release:
1621
runs-on: ubuntu-latest
1722
environment: semantic-release
23+
outputs:
24+
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
25+
new_release_version: ${{ steps.semantic.outputs.new_release_version }}
26+
release_sha: ${{ steps.release-sha.outputs.sha }}
1827
steps:
1928
- name: Checkout
2029
uses: actions/checkout@v4
@@ -30,9 +39,12 @@ jobs:
3039
- name: Setup Node.js
3140
uses: actions/setup-node@v4
3241
with:
33-
node-version: 22
42+
node-version: 22.21.1
3443
cache: pnpm
3544

45+
- name: Upgrade npm to latest
46+
run: npm install -g npm@latest
47+
3648
- name: Install dependencies
3749
run: pnpm install --frozen-lockfile
3850

@@ -49,57 +61,79 @@ jobs:
4961
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
5062
SEMANTIC_RELEASE_DEBUG: true
5163

64+
- name: Capture release SHA
65+
id: release-sha
66+
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
67+
68+
build-image:
69+
needs: release
70+
if: needs.release.outputs.new_release_published == 'true'
71+
runs-on: ubuntu-latest
72+
steps:
73+
- name: Checkout
74+
uses: actions/checkout@v4
75+
with:
76+
fetch-depth: 0
77+
fetch-tags: true
78+
ref: ${{ needs.release.outputs.release_sha }}
79+
5280
- name: Login to DockerHub
53-
# Only login if we are actually going to build (a release happened)
54-
if: steps.semantic.outputs.new_release_published == 'true'
5581
uses: docker/login-action@v3
5682
with:
5783
username: ${{ secrets.DOCKERHUB_USERNAME }}
5884
password: ${{ secrets.DOCKERHUB_TOKEN }}
5985

6086
- name: Docker Metadata
6187
id: meta
62-
if: steps.semantic.outputs.new_release_published == 'true'
6388
uses: docker/metadata-action@v5
6489
with:
6590
images: informaticsmatters/squonk2-data-manager-ui
6691
tags: |
67-
type=raw,value=${{ steps.semantic.outputs.new_release_version }}
68-
type=raw,value=stable,enable=${{ !contains(steps.semantic.outputs.new_release_version, '-dev.') }}
69-
type=raw,value=latest,enable=${{ !contains(steps.semantic.outputs.new_release_version, '-dev.') }}
92+
type=raw,value=${{ needs.release.outputs.new_release_version }}
93+
type=raw,value=stable,enable=${{ !contains(needs.release.outputs.new_release_version, '-dev.') }}
94+
type=raw,value=latest,enable=${{ !contains(needs.release.outputs.new_release_version, '-dev.') }}
7095
7196
- name: Build and push image
72-
if: steps.semantic.outputs.new_release_published == 'true'
7397
uses: docker/build-push-action@v6
7498
with:
99+
context: .
100+
file: ./Dockerfile
75101
push: true
76102
build-args: |
77-
GIT_SHA=${{ github.sha }}
103+
GIT_SHA=${{ needs.release.outputs.release_sha }}
78104
SKIP_CHECKS=1
79105
BASE_PATH=/data-manager-ui
80106
tags: ${{ steps.meta.outputs.tags }}
81107
labels: ${{ steps.meta.outputs.labels }}
82108

109+
trigger-awx-test:
110+
needs: [release, build-image]
111+
if: needs.release.outputs.new_release_published == 'true' && contains(needs.release.outputs.new_release_version, '-dev.')
112+
runs-on: ubuntu-latest
113+
environment: awx/dls-test
114+
steps:
83115
- name: Trigger AWX test
84-
# Run only if released AND it is a dev version
85-
if: ${{ steps.semantic.outputs.new_release_published == 'true' && contains(steps.semantic.outputs.new_release_version, '-dev.') }}
86116
uses: informaticsmatters/trigger-awx-action@v2
87117
with:
88118
template: Squonk/2 Data Manager UI -test-
89119
template-host: ${{ secrets.AWX_HOST }}
90120
template-user: ${{ secrets.AWX_USER }}
91121
template-user-password: ${{ secrets.AWX_USER_PASSWORD }}
92122
template-var: maui_image_tag
93-
template-var-value: ${{ steps.semantic.outputs.new_release_version }}
123+
template-var-value: ${{ needs.release.outputs.new_release_version }}
94124

125+
trigger-awx-production:
126+
needs: [release, build-image]
127+
if: needs.release.outputs.new_release_published == 'true' && !contains(needs.release.outputs.new_release_version, '-dev.')
128+
runs-on: ubuntu-latest
129+
environment: awx/im-main
130+
steps:
95131
- name: Trigger AWX production
96-
# Run only if released AND it is NOT a dev version
97-
if: ${{ steps.semantic.outputs.new_release_published == 'true' && !contains(steps.semantic.outputs.new_release_version, '-dev.') }}
98132
uses: informaticsmatters/trigger-awx-action@v1
99133
with:
100134
template: Data Manager UI -production-
101135
template-host: ${{ secrets.AWX_HOST }}
102136
template-user: ${{ secrets.AWX_USER }}
103137
template-user-password: ${{ secrets.AWX_USER_PASSWORD }}
104138
template-var: maui_image_tag
105-
template-var-value: ${{ steps.semantic.outputs.new_release_version }}
139+
template-var-value: ${{ needs.release.outputs.new_release_version }}

.github/workflows/test.yaml

Lines changed: 4 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
curl -f -X 'GET' \
4040
'https://account-server-test.xchem-dev.diamond.ac.uk/account-server-api/version' \
4141
-H 'accept: application/json'
42-
test-base-path:
42+
test:
4343
needs: check-api # tests are skipped if APIs are down to avoid false negatives
4444
# Setup
4545
runs-on: ubuntu-latest
@@ -54,7 +54,7 @@ jobs:
5454
- name: Setup Node
5555
uses: actions/setup-node@v4
5656
with:
57-
node-version: 22
57+
node-version: 22.21.1
5858
cache: 'pnpm'
5959
- name: Install dependencies
6060
run: pnpm install
@@ -80,15 +80,6 @@ jobs:
8080
# Ok for tests/dev but we don't do this on prod. This is to prevent some flakely tests from causing problems
8181
- name: Disable strict SSL
8282
run: npm config set strict-ssl=false
83-
# Manually add a "test concurrency"
84-
# This ensures only one test job runs at a time (across all workflows)
85-
# If this workflow is billed by the elapsed time, this will add a lot to this cost
86-
- name: Turnstyle
87-
uses: softprops/turnstyle@v2
88-
with:
89-
abort-after-seconds: 600
90-
env:
91-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9283
- name: Test with base path
9384
env:
9485
AUTH0_CLIENT_ID: "${{ secrets.AUTH0_CLIENT_ID }}"
@@ -107,80 +98,9 @@ jobs:
10798
PW_PASSWORD: "${{ secrets.DMIT_USER_A_PASSWORD }}"
10899
TEST_PORT: 3000
109100
run: pnpm test:ci
110-
- name: Upload results for bath path
111-
if: always()
112-
uses: actions/upload-artifact@v4
113-
with:
114-
name: Base Path Results
115-
path: test-results
116-
test-no-base-path:
117-
needs: check-api # tests are skipped if APIs are down to avoid false negatives
118-
# Setup
119-
runs-on: ubuntu-latest
120-
environment: data-manager-ui/test
121-
steps:
122-
- name: Checkout
123-
uses: actions/checkout@v4
124-
- uses: pnpm/action-setup@v4.1.0
125-
with:
126-
version: 10.24.0
127-
run_install: false
128-
- name: Setup Node
129-
uses: actions/setup-node@v4
130-
with:
131-
node-version: 22
132-
cache: 'pnpm'
133-
- name: Install dependencies
134-
run: pnpm install
135-
- run: node -v
136-
- name: Setup Playwright
137-
run: pnpm exec playwright install --with-deps
138-
- name: Load cached build for speed
139-
uses: actions/cache@v4
140-
with:
141-
path: |
142-
${{ github.workspace }}/.next/cache
143-
# Generate a new cache whenever packages or source files change.
144-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{
145-
hashFiles('**.[jt]s', '**.[jt]sx') }}
146-
# If source files changed but packages didn't, rebuild from a prior cache.
147-
restore-keys: |
148-
${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
149-
# Test withOUT base path set
150-
- name: Build without base path
151-
run: pnpm build
152-
env:
153-
BASE_PATH: ""
154-
# Ok for tests/dev but we don't do this on prod. This is to prevent some flakely tests from causing problems
155-
- name: Disable strict SSL
156-
run: npm config set strict-ssl=false
157-
- name: Turnstyle
158-
uses: softprops/turnstyle@v2
159-
with:
160-
abort-after-seconds: 600
161-
env:
162-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
163-
- name: Test without base path
164-
env:
165-
AUTH0_CLIENT_ID: "${{ secrets.AUTH0_CLIENT_ID }}"
166-
AUTH0_CLIENT_SECRET: "${{ secrets.AUTH0_CLIENT_SECRET }}"
167-
DMIT_USER_A_PASSWORD: "${{ secrets.DMIT_USER_A_PASSWORD }}"
168-
AUTH0_SECRET: "LONG_RANDOM_VALUE"
169-
BASE_URL: "http://localhost:3000"
170-
DONT_USE_STANDALONE_OUTPUT: true
171-
DANGEROUS__DISABLE_SSL_CERT_CHECK_IN_API_PROXY: 1
172-
BASE_PATH: ""
173-
DATA_MANAGER_API_SERVER: "https://data-manager-test.xchem-dev.diamond.ac.uk/data-manager-api"
174-
ACCOUNT_SERVER_API_SERVER: "https://account-server-test.xchem-dev.diamond.ac.uk\
175-
/account-server-api"
176-
KEYCLOAK_URL: "https://keycloak-test.xchem-dev.diamond.ac.uk/auth/realms/squonk"
177-
PW_USERNAME: "dmit-user-a"
178-
PW_PASSWORD: "${{ secrets.DMIT_USER_A_PASSWORD }}"
179-
TEST_PORT: 3000
180-
run: pnpm test:ci
181-
- name: Upload results for no bath path
101+
- name: Upload test results
182102
if: always()
183103
uses: actions/upload-artifact@v4
184104
with:
185-
name: No Base Path Results
105+
name: Test Results
186106
path: test-results

.vscode/mcp.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"servers": {
3+
"mui-mcp": {
4+
"type": "stdio",
5+
"command": "npx",
6+
"args": [
7+
"-y",
8+
"@mui/mcp@latest"
9+
]
10+
}
11+
}
12+
}

0 commit comments

Comments
 (0)