Skip to content

Commit 8a719b6

Browse files
committed
Merge branch 'development' into prod-helm-deploy
# Conflicts: # .github/workflows/dev-build.yml # .github/workflows/prod-build.yml # Dockerfile.prod # yarn.lock
2 parents e465718 + 36fd947 commit 8a719b6

40 files changed

+9256
-12488
lines changed

.eslintignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

.eslintrc.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/dev-build.yml

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This worklflow will perform following actions when the code is pushed to development branch:
22
# - Run end to end test.
33
# - Check Linting.
4-
# - Build the latest docker image in development which needs both e2etest and lint to pass first.
4+
# - Build the latest docker image in development which needs both e2e and lint to pass first.
55
# - Push the latest docker image to Google Artifact Registry-Dev.
66
# - Rollout the latest image in GKE.
77
#
@@ -16,17 +16,14 @@ on:
1616
branches: [development]
1717

1818
env:
19-
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
20-
GKE_CLUSTER_DEV: nmrxiv-dev
21-
GKE_ZONE: europe-west3-a
2219
DEPLOYMENT_NAME: nmrxiv-nmrium
2320
DOCKER_HUB_USERNAME : ${{ secrets.DOCKER_HUB_USERNAME }}
2421
DOCKER_HUB_PASSWORD : ${{ secrets.DOCKER_HUB_PASSWORD }}
2522
REPOSITORY_NAME: nmrium-react-wrapper
2623
REPOSITORY_NAMESPACE: nfdi4chem
2724

2825
jobs:
29-
e2etest:
26+
e2e:
3027
uses: NFDI4Chem/nmrium-react-wrapper/.github/workflows/e2e.yml@main
3128

3229
lint:
@@ -36,25 +33,15 @@ jobs:
3633
name: Deploy to dev
3734
if: github.ref == 'refs/heads/development'
3835
runs-on: ubuntu-latest
39-
needs: [lint, e2etest]
36+
needs: [lint, e2e]
4037
steps:
4138
- name: Checkout
42-
uses: actions/checkout@v3
39+
uses: actions/checkout@v4
4340

44-
# Setup gcloud CLI
45-
- name: Setup CLI
46-
uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7
47-
with:
48-
service_account_key: ${{ secrets.GKE_SA_KEY }}
49-
project_id: ${{ secrets.GKE_PROJECT }}
50-
51-
# Get the GKE credentials so we can deploy to the cluster
52-
- name: Get GKE credentials
53-
uses: google-github-actions/[email protected]
54-
with:
55-
cluster_name: ${{ env.GKE_CLUSTER_DEV }}
56-
location: ${{ env.GKE_ZONE }}
57-
credentials: ${{ secrets.GKE_SA_KEY }}
41+
- name: Update version number
42+
run: |
43+
VERSION=${GITHUB_REF//*\/}
44+
echo "export default { version: '$VERSION' };" > src/versionInfo.ts
5845
5946
- name: Log in to Docker Hub
6047
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
@@ -73,10 +60,3 @@ jobs:
7360
tags: ${{ env.REPOSITORY_NAMESPACE }}/${{ env.REPOSITORY_NAME }}:dev-latest
7461
username: ${{ env.DOCKER_HUB_USERNAME }}
7562
password: ${{ env.DOCKER_HUB_PASSWORD }}
76-
77-
# Deploy the latest Docker image to the GKE cluster
78-
- name: Deploy
79-
run: |-
80-
kubectl rollout restart deployment/$DEPLOYMENT_NAME
81-
kubectl rollout status deployment/$DEPLOYMENT_NAME --timeout=300s
82-
kubectl get services -o wide

.github/workflows/dev-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- development
77

88
jobs:
9-
e2etest:
9+
e2e:
1010
uses: NFDI4Chem/nmrium-react-wrapper/.github/workflows/e2e.yml@main
1111
lint:
1212
uses: NFDI4Chem/nmrium-react-wrapper/.github/workflows/nodejs.yml@main

.github/workflows/e2e.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ on:
44
workflow_call:
55

66
jobs:
7-
e2etest:
8-
runs-on: ubuntu-latest
7+
e2e:
8+
runs-on: macos-latest
99
strategy:
1010
matrix:
1111
project: [chromium, firefox, webkit]
1212
fail-fast: false
1313
steps:
14-
- uses: actions/checkout@v3
15-
- uses: actions/setup-node@v3
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
1616
with:
17-
node-version: 18.x
17+
node-version-file: package.json
1818
- name: Install dependencies
1919
run: npm ci
2020
- name: Install Playwright
@@ -26,8 +26,9 @@ jobs:
2626
continue-on-error: ${{ matrix.project == 'webkit' }}
2727
- name: Upload test results
2828
if: always()
29-
uses: actions/upload-artifact@v3
29+
uses: actions/upload-artifact@v4
3030
with:
31-
name: test-results-${{ matrix.project }}
32-
path: test-results
33-
31+
name: playwright-${{ matrix.project }}
32+
path: |
33+
test-results
34+
playwright-report

.github/workflows/nodejs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ jobs:
77
nodejs:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v3
11-
- uses: actions/setup-node@v3
10+
- uses: actions/checkout@v4
11+
- uses: actions/setup-node@v4
1212
with:
13-
node-version: 18.x
13+
node-version-file: package.json
1414
- name: Install dependencies
1515
run: npm ci
1616
- name: Run ESLint

.github/workflows/prod-build.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ on:
1717
branches: [prod-helm-deploy]
1818

1919
env:
20-
PROJECT_ID: ${{ secrets.GKE_PROJECT }}
21-
GKE_CLUSTER_PROD: nmrxiv-prod
22-
GKE_ZONE: europe-west3-a
2320
DEPLOYMENT_NAME: nmrxiv-nmrium
2421
DOCKER_HUB_USERNAME : ${{ secrets.DOCKER_HUB_USERNAME }}
2522
DOCKER_HUB_PASSWORD : ${{ secrets.DOCKER_HUB_PASSWORD }}
@@ -34,28 +31,13 @@ jobs:
3431
steps:
3532
- name: Checkout
3633
uses: actions/[email protected]
37-
38-
# Setup gcloud CLI
39-
- name: Setup CLI
40-
uses: google-github-actions/setup-gcloud@94337306dda8180d967a56932ceb4ddcf01edae7
41-
with:
42-
service_account_key: ${{ secrets.GKE_SA_KEY }}
43-
project_id: ${{ secrets.GKE_PROJECT }}
4434

4535
# Login to Docker Hub
4636
- name: Log in to Docker Hub
4737
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
4838
with:
4939
username: ${{ env.DOCKER_HUB_USERNAME }}
5040
password: ${{ env.DOCKER_HUB_PASSWORD }}
51-
52-
# Get the GKE credentials so we can deploy to the cluster
53-
- name: Get GKE credentials
54-
uses: google-github-actions/[email protected]
55-
with:
56-
cluster_name: ${{ env.GKE_CLUSTER_PROD }}
57-
location: ${{ env.GKE_ZONE }}
58-
credentials: ${{ secrets.GKE_SA_KEY }}
5941

6042
#Fetch latest release
6143
- name: Fetch latest release
@@ -94,11 +76,3 @@ jobs:
9476
uses: EndBug/[email protected]
9577
with:
9678
default_author: github_actions
97-
98-
# Deploy the latest Docker image to the GKE cluster
99-
- name: Deploy
100-
if: ${{ steps.fetch-latest-release.outputs.tag_name }}
101-
run: |-
102-
kubectl rollout restart deployment/$DEPLOYMENT_NAME
103-
kubectl rollout status deployment/$DEPLOYMENT_NAME --timeout=300s
104-
kubectl get services -o wide

.github/workflows/release-please.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This worklflow will perform following actions when the code is pushed to main branch.
33
# - Run end to end test
44
# - Test linting.
5-
# - Trigger release-please action to create release which needs e2etest & lint to pass first.
5+
# - Trigger release-please action to create release which needs e2e & lint to pass first.
66
#
77
# Maintainers:
88
# - name: Nisha Sharma
@@ -16,15 +16,15 @@ on:
1616
- main
1717

1818
jobs:
19-
e2etest:
19+
e2e:
2020
uses: NFDI4Chem/nmrium-react-wrapper/.github/workflows/e2e.yml@main
2121

2222
lint:
2323
uses: NFDI4Chem/nmrium-react-wrapper/.github/workflows/nodejs.yml@main
2424

2525
release-please:
2626
runs-on: ubuntu-latest
27-
needs: ['lint', 'e2etest']
27+
needs: ['lint', 'e2e']
2828
steps:
2929
- uses: google-github-actions/release-please-action@v3
3030
with:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,5 @@ yarn.lock
3131

3232
/test-results
3333
/playwright-report
34+
35+
build/

.ncurc.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Do not update to React 19 because some packages not compatible with React 19
2+
reject:
3+
- react
4+
- react-dom
5+
- '@types/react'
6+
- '@types/react-dom'

0 commit comments

Comments
 (0)