Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This worklflow will perform following actions when the code is pushed to development branch:
# - Run end to end test.
# - Check Linting.
# - Build the latest docker image in development which needs both e2etest and lint to pass first.
# - Build the latest docker image in development which needs both e2e and lint to pass first.
# - Push the latest docker image to Google Artifact Registry-Dev.
# - Rollout the latest image in GKE.
#
Expand All @@ -26,7 +26,7 @@ env:
REPOSITORY_NAMESPACE: nfdi4chem

jobs:
e2etest:
e2e:
uses: NFDI4Chem/nmrium-react-wrapper/.github/workflows/e2e.yml@main

lint:
Expand All @@ -36,7 +36,7 @@ jobs:
name: Deploy to dev
if: github.ref == 'refs/heads/development'
runs-on: ubuntu-latest
needs: [lint, e2etest]
needs: [lint, e2e]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dev-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- development

jobs:
e2etest:
e2e:
uses: NFDI4Chem/nmrium-react-wrapper/.github/workflows/e2e.yml@main
lint:
uses: NFDI4Chem/nmrium-react-wrapper/.github/workflows/nodejs.yml@main
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
workflow_call:

jobs:
e2etest:
runs-on: ubuntu-latest
e2e:
runs-on: macos-latest
strategy:
matrix:
project: [chromium, firefox, webkit]
Expand All @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
node-version-file: package.json
- name: Install dependencies
run: npm ci
- name: Install Playwright
Expand All @@ -28,6 +28,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.project }}
path: test-results

name: playwright-${{ matrix.project }}
path: |
test-results
playwright-report
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
node-version-file: package.json
- name: Install dependencies
run: npm ci
- name: Run ESLint
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This worklflow will perform following actions when the code is pushed to main branch.
# - Run end to end test
# - Test linting.
# - Trigger release-please action to create release which needs e2etest & lint to pass first.
# - Trigger release-please action to create release which needs e2e & lint to pass first.
#
# Maintainers:
# - name: Nisha Sharma
Expand All @@ -16,15 +16,15 @@ on:
- main

jobs:
e2etest:
e2e:
uses: NFDI4Chem/nmrium-react-wrapper/.github/workflows/e2e.yml@main

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

release-please:
runs-on: ubuntu-latest
needs: ['lint', 'e2etest']
needs: ['lint', 'e2e']
steps:
- uses: google-github-actions/release-please-action@v3
with:
Expand Down
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
FROM node:18-alpine3.14
FROM node:22-alpine3.18

WORKDIR /app

ENV PATH /app/node_modules/.bin:$PATH

COPY package.json ./
COPY package-lock.json ./
RUN npm install --silent
RUN npm install react-scripts@latest -g --silent
RUN npm i --silent
RUN npm i react-scripts@latest -g --silent

COPY . ./
8 changes: 4 additions & 4 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# build environment
FROM node:18-alpine3.14 as build
FROM node:22-alpine as build
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json ./
COPY package-lock.json ./
RUN export NODE_OPTIONS=--max-old-space-size=8192
RUN npm ci --silent
RUN npm install react-scripts@latest -g --silent
RUN npm i --silent

RUN npm i react-scripts@latest -g --silent
COPY . ./
RUN npm run build

Expand Down
7 changes: 3 additions & 4 deletions Dockerfile.prod
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# build environment
FROM node:18-alpine3.14 as build
FROM node:22-alpine3.18 as build

# ARG RELEASE_VERSION
# ENV RELEASE_VERSION=${RELEASE_VERSION}

WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json ./
COPY package-lock.json ./
RUN export NODE_OPTIONS=--max-old-space-size=8192
RUN npm ci --silent
RUN npm install react-scripts@latest -g --silent
RUN npm i --silent
RUN npm i react-scripts@latest -g --silent
COPY . ./
RUN echo "export default { version: '$RELEASE_VERSION' };" > src/versionInfo.ts
RUN npm run build -- --outDir=build
Expand Down
7 changes: 7 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ export default [
...ts,
...unicorn,
...react,
{
files: ['**/*.{ts,tsx,cts,mts}'],
rules: {
'@typescript-eslint/consistent-type-imports': 'error',
'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
},
},
{
rules: {
'import/default': 'off',
Expand Down
Loading
Loading