Skip to content
Draft
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
21 changes: 10 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
- name: Setup Node and npm
uses: ./.github/workflows/common/setup-node-and-npm
with:
node-version: 22
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
cache-dependency-path: ./package-lock.json

- name: Install dependencies
run: npm ci
run: npm ci --ignore-scripts

- name: 'Bats start.sh Tests'
run: |
npm install -g bats
npm install -g bats --ignore-scripts
npm run test:bats-start
env:
GITHUB_WORKSPACE: ${{ github.workspace }}
Expand Down Expand Up @@ -127,17 +125,18 @@ jobs:
- name: Checkout
if: ${{ steps.should.outputs.RUN == 'true' }}
uses: actions/checkout@v4
- name: Install Node.js
- name: Setup Node and npm
if: ${{ steps.should.outputs.RUN == 'true' }}
uses: actions/setup-node@v4
uses: ./.github/workflows/common/setup-node-and-npm
with:
node-version: 22
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
cache-dependency-path: ./package-lock.json
- name: Install dependencies
if: ${{ steps.should.outputs.RUN == 'true' }}
run: npm ci
run: npm ci --ignore-scripts
- name: Apply patches
if: ${{ steps.should.outputs.RUN == 'true' }}
run: npm run patch:apply
- name: Build NestJS
if: ${{ steps.should.outputs.RUN == 'true' }}
run: npm run build:${{ matrix.service }}
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/common/openapi-build/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@ runs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
- name: Setup Node and npm
uses: ./.github/workflows/common/setup-node-and-npm
with:
node-version: 22
cache-dependency-path: ./package-lock.json

- name: Install dependencies
run: npm ci
run: npm ci --ignore-scripts
shell: bash

- name: Apply patches
run: npm run patch:apply
shell: bash

- name: Generate OpenAPI/Swagger JSON
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/common/setup-node-and-npm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Setup Node and npm"
description: "Set up Node.js and ensure an npm supporting 'id-token' is installed"

inputs:
node-version:
description: "Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0."
required: false
default: "22.x"
cache:
description: "Used to specify a package manager for caching in the default directory. Supported values: npm, yarn, pnpm."
required: false
default: "npm"
cache-dependency-path:
description: "Used to specify the path to a dependency file: package-lock.json, yarn.lock, etc. Supports wildcards or a list of file names for caching multiple dependencies."
required: true

runs:
using: "composite"
steps:
- name: Set up Node.js
# Use whatever version of setup-node you actually want here
uses: actions/setup-node@v6
with:
node-version: ${{ inputs.node-version }}
cache: ${{ inputs.cache }}
cache-dependency-path: ${{ inputs.cache-dependency-path }}

- name: Update npm to latest 11.x
shell: bash
run: |
npm install -g 'npm@^11'
echo "npm version: $(npm --version)"
7 changes: 4 additions & 3 deletions .github/workflows/deploy-gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
- name: Setup Node and npm
uses: ./.github/workflows/common/setup-node-and-npm
with:
node-version: 22
cache-dependency-path: package-lock.json

- name: Set up mdBook 📚
uses: ./.github/workflows/common/set-up-mdbook
Expand All @@ -37,7 +38,7 @@ jobs:

- name: Build with mdBook
working-directory: docs
run: npm i && mdbook build && ls book
run: npm i --ignore-scripts && mdbook build && ls book

# Upload the mdBook output to GitHub Pages
- name: Upload mdbook to GitHub Pages
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,18 +77,16 @@ jobs:
if: ${{ steps.should.outputs.RUN == 'true' }}
uses: actions/checkout@v4

- name: Install Node.js
- name: Setup Node and npm
if: ${{ steps.should.outputs.RUN == 'true' }}
uses: actions/setup-node@v4
uses: ./.github/workflows/common/setup-node-and-npm
with:
node-version: 22.14.0
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
cache-dependency-path: tools/ci-k6/package-lock.json

- name: Install dependencies
if: ${{ steps.should.outputs.RUN == 'true' }}
run: npm ci
run: npm ci --ignore-scripts

- name: Set up Docker Buildx
if: ${{ steps.should.outputs.RUN == 'true' }}
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/load-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,17 @@ jobs:
if: ${{ steps.should.outputs.RUN == 'true' }}
uses: actions/checkout@v4

- name: Install Node.js
- name: Setup Node and npm
if: ${{ steps.should.outputs.RUN == 'true' }}
uses: actions/setup-node@v4
uses: ./.github/workflows/common/setup-node-and-npm
with:
node-version: 22
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
cache-dependency-path: tools/ci-k6/package-lock.json

- name: Install dependencies
if: ${{ steps.should.outputs.RUN == 'true' }}
working-directory: tools/ci-k6
run: npm ci
run: npm ci --ignore-scripts

- name: Set up Docker Buildx
if: ${{ steps.should.outputs.RUN == 'true' }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/verify-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v4
- name: Setup Node and npm
uses: ./.github/workflows/common/setup-node-and-npm
with:
node-version: 22
cache-dependency-path: package-lock.json

- name: Set up mdBook 📚
uses: ./.github/workflows/common/set-up-mdbook
Expand All @@ -28,4 +28,4 @@ jobs:

- name: Build mdBook 📚
working-directory: docs
run: npm i && mdbook build && ls book
run: npm ci --ignore-scripts && mdbook build && ls book
23 changes: 9 additions & 14 deletions Docker/Dockerfile.account
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
# Use a multi-stage build for efficiency
FROM node:22 AS builder

RUN npm install -g 'npm@^11'

WORKDIR /build

COPY package* tsconfig* nest-cli.json ./

WORKDIR /build/patches

COPY patches ./

RUN npm ci

WORKDIR /build/libs

COPY libs ./
COPY patches ./patches/

WORKDIR /build/apps/account-api
RUN npm ci --ignore-scripts && npm run patch:apply

COPY apps/account-api ./
COPY libs ./libs/

WORKDIR /build/apps/account-worker
COPY apps/account-api ./apps/account-api/

COPY apps/account-worker ./
COPY apps/account-worker ./apps/account-worker/

# Build the application
RUN npm run build:account && \
rm -rf node_modules && \
npm ci --omit=dev
npm ci --omit=dev --ignore-scripts && \
npm run patch:apply

# Production stage
FROM node:22-alpine
Expand Down
23 changes: 9 additions & 14 deletions Docker/Dockerfile.content-publishing
Original file line number Diff line number Diff line change
@@ -1,32 +1,27 @@
# Use a multi-stage build for efficiency
FROM node:22 AS builder

RUN npm install -g 'npm@^11'

WORKDIR /build

COPY package* tsconfig* nest-cli.json ./

WORKDIR /build/patches

COPY patches ./

RUN npm ci

WORKDIR /build/libs

COPY libs ./
COPY patches ./patches/

WORKDIR /build/apps/content-publishing-api
RUN npm ci --ignore-scripts && npm run patch:apply

COPY apps/content-publishing-api ./
COPY libs ./libs/

WORKDIR /build/apps/content-publishing-worker
COPY apps/content-publishing-api ./apps/content-publishing-api/

COPY apps/content-publishing-worker ./
COPY apps/content-publishing-worker ./apps/content-publishing-worker/

# Build the application
RUN npm run build:content-publishing && \
rm -rf node_modules && \
npm ci --omit=dev
npm ci --omit=dev --ignore-scripts && \
npm run patch:apply

# Production stage
FROM node:22-alpine
Expand Down
19 changes: 8 additions & 11 deletions Docker/Dockerfile.content-watcher
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
# Use a multi-stage build for efficiency
FROM node:22 AS builder

RUN npm install -g 'npm@^11'

WORKDIR /build

COPY package* tsconfig* nest-cli.json ./

WORKDIR /build/patches

COPY patches ./

RUN npm ci

WORKDIR /build/libs
COPY patches ./patches/

COPY libs ./
RUN npm ci --ignore-scripts && npm run patch:apply

WORKDIR /build/apps/content-watcher
COPY libs ./libs/

COPY apps/content-watcher ./
COPY apps/content-watcher ./apps/content-watcher/

# Build the application
RUN npm run build:content-watcher && \
rm -rf node_modules && \
npm ci --omit=dev
npm ci --omit=dev --ignore-scripts && \
npm run patch:apply

# Production stage
FROM node:22-alpine
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ DOCKER_BUILD_TARGETS=$(DOCKER_SERVICES:%=docker-build-%)
.PHONY: build test test-e2e lint format docker-build $(TEST_TARGETS) $(E2E_TARGETS) $(DOCKER_BUILD_TARGETS)

deps:
@npm ci
@npm ci --ignore-scripts

update-packages:
@npm i
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ Use this script when you need to stop all running Gateway services.
cargo install mdbook-mermaid@0.15.0

cd docs
npm install
npm ci --ignore-scripts
mdbook build
```

Expand Down
4 changes: 2 additions & 2 deletions developer-docs/account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ Ensure you have the following installed:
3. Install dependencies:

```bash
npm install
```
npm ci --ignore-scripts && npm run patch:apply
```

4. Start supporting services (local frequency node, redis) using Docker:

Expand Down
2 changes: 1 addition & 1 deletion developer-docs/content-publishing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Ensure you have the following installed:
2. Install dependencies:

```bash
npm install
npm ci --ignore-scripts && npm run patch:apply
```

3. Set up environment variables:
Expand Down
4 changes: 2 additions & 2 deletions developer-docs/content-watcher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ Ensure you have the following installed:
2. Install dependencies:

```bash
npm install
```
npm ci --ignore-scripts && npm run patch:apply
```

3. Start auxiliary services:

Expand Down
Loading
Loading