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
20 changes: 12 additions & 8 deletions .github/workflows/build-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,43 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
package_json_file: client/package.json

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'npm'
cache-dependency-path: 'client/package-lock.json'
cache: 'pnpm'
cache-dependency-path: 'client/pnpm-lock.yaml'

- name: Install dependencies
run: |
cd client
npm ci
pnpm install --frozen-lockfile

- name: Build frontend
run: |
cd client
npm run build
pnpm run build

- name: Setup Node.js (V3)
uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'npm'
cache-dependency-path: 'client-v3/package-lock.json'
cache: 'pnpm'
cache-dependency-path: 'client-v3/pnpm-lock.yaml'

- name: Install dependencies (V3)
run: |
cd client-v3
npm ci
pnpm install --frozen-lockfile

- name: Build frontend (V3)
run: |
cd client-v3
npm run build
pnpm run build

- name: Upload frontend build
uses: actions/upload-artifact@v4
Expand Down
28 changes: 19 additions & 9 deletions .github/workflows/client-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,19 @@ jobs:
run:
working-directory: ./client
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
package_json_file: client/package.json
- uses: actions/setup-node@v4
with:
node-version: 24
cache: 'pnpm'
cache-dependency-path: 'client/pnpm-lock.yaml'
- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile
- name: Run tests
run: npm run test:run
run: pnpm run test:run
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
Expand All @@ -33,17 +38,22 @@ jobs:
run:
working-directory: ./client-v3
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
package_json_file: client-v3/package.json
- uses: actions/setup-node@v4
with:
node-version: 24
cache: 'pnpm'
cache-dependency-path: 'client-v3/pnpm-lock.yaml'
- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile
- name: Run tests
run: npm run test:run
run: pnpm run test:run
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
check_name: 'Client V3 Test Results'
junit_files: '**/client-v3/junit/*.xml'
junit_files: '**/client-v3/junit/*.xml'
37 changes: 28 additions & 9 deletions .github/workflows/nodelint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,45 +12,64 @@ jobs:
working-directory: ./client
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
package_json_file: client/package.json
- uses: actions/setup-node@v4
with:
node-version: 24
- run: npm ci
- run: npm run ci-lint
cache: 'pnpm'
cache-dependency-path: 'client/pnpm-lock.yaml'
- run: pnpm install --frozen-lockfile
- run: pnpm run ci-lint
run-typecheck:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./client
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
package_json_file: client/package.json
- uses: actions/setup-node@v4
with:
node-version: 24
- run: npm ci
- run: npm run typecheck
cache: 'pnpm'
cache-dependency-path: 'client/pnpm-lock.yaml'
- run: pnpm install --frozen-lockfile
- run: pnpm run typecheck
run-node-lint-client-v3:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./client-v3
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
package_json_file: client-v3/package.json
- uses: actions/setup-node@v4
with:
node-version: 24
- run: npm ci
- run: npm run ci-lint
cache: 'pnpm'
cache-dependency-path: 'client-v3/pnpm-lock.yaml'
- run: pnpm install --frozen-lockfile
- run: pnpm run ci-lint
run-typecheck-client-v3:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./client-v3
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
package_json_file: client-v3/package.json
- uses: actions/setup-node@v4
with:
node-version: 24
- run: npm ci
- run: npm run typecheck

cache: 'pnpm'
cache-dependency-path: 'client-v3/pnpm-lock.yaml'
- run: pnpm install --frozen-lockfile
- run: pnpm run typecheck
14 changes: 10 additions & 4 deletions .github/workflows/playwright-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,33 @@ jobs:
run: pip install -r requirements.txt
working-directory: ./server

- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
package_json_file: client-v3/package.json

- name: Set up Node 24
uses: actions/setup-node@v4
with:
node-version: 24
cache: 'pnpm'
cache-dependency-path: 'client-v3/pnpm-lock.yaml'

- name: Install Node dependencies
run: npm ci
run: pnpm install --frozen-lockfile
working-directory: ./client-v3

- name: Build Vue 3 frontend
run: npm run build
run: pnpm run build
working-directory: ./client-v3

- name: Install Playwright browser
# matrix.browser is a static value from the matrix definition (chromium/firefox)
run: npx playwright install --with-deps ${{ matrix.browser }}
run: pnpm exec playwright install --with-deps ${{ matrix.browser }}
working-directory: ./client-v3

- name: Run Playwright tests
# matrix.browser is a static value from the matrix definition (chromium/firefox)
run: npx playwright test --project=${{ matrix.browser }}
run: pnpm exec playwright test --project=${{ matrix.browser }}
working-directory: ./client-v3

# Retries mean a test that fails then passes shows up in the run as
Expand Down
17 changes: 10 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,28 @@
# native build platform rather than emulating the target arch (slow under QEMU).
FROM --platform=$BUILDPLATFORM node:24-bookworm AS build_v2

RUN corepack enable
RUN mkdir -p /server/static
COPY /client/package.json /client/package.json
COPY /client/package-lock.json /client/package-lock.json
COPY /client/.npmrc /client/.npmrc
COPY /client/pnpm-lock.yaml /client/pnpm-lock.yaml
COPY /client/pnpm-workspace.yaml /client/pnpm-workspace.yaml
WORKDIR /client
RUN npm ci
RUN pnpm install --frozen-lockfile
COPY /client /client
RUN npm run build
RUN pnpm run build

FROM --platform=$BUILDPLATFORM node:24-bookworm AS build_v3

RUN corepack enable
RUN mkdir -p /server/static
COPY /client-v3/package.json /client-v3/package.json
COPY /client-v3/package-lock.json /client-v3/package-lock.json
COPY /client-v3/pnpm-lock.yaml /client-v3/pnpm-lock.yaml
COPY /client-v3/pnpm-workspace.yaml /client-v3/pnpm-workspace.yaml
WORKDIR /client-v3
RUN npm ci
RUN pnpm install --frozen-lockfile
COPY /client-v3 /client-v3
COPY /docs /docs
RUN npm run build
RUN pnpm run build

FROM python:3.13-bookworm

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Every live show session is recorded with start/end times and can be tagged for o

### Requirements

* Node v24.x (npm 11.x)
* Node v24.15+ (pnpm 12.x: run `corepack enable` once and it will use the version pinned in `packageManager`)
* Python 3.13.x

### Quick Start with Docker Compose (Recommended)
Expand All @@ -93,9 +93,9 @@ DigiScript will be available at `http://localhost:8080`
Build the frontend (output goes to `../server/static/`):

```shell
cd client
npm ci
npm run build
cd client-v3
pnpm install
pnpm run build
```

#### Server
Expand Down
1 change: 1 addition & 0 deletions client-v3/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
package-lock.json
dist/
junit/
coverage/
Expand Down
2 changes: 0 additions & 2 deletions client-v3/.npmrc

This file was deleted.

16 changes: 8 additions & 8 deletions client-v3/README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
# DigiScript Client (V3)

**Requirements**: Node 24.x
**Requirements**: Node 24.15+, pnpm 12.x (run `corepack enable` once; it uses the version pinned in `packageManager`)

## Project setup
```
npm ci
pnpm install
```

### Run the development server
```
npm run dev
pnpm run dev
```

The dev server starts at `http://localhost:5173` and proxies API requests to `http://localhost:8080`.

### Compiles and minifies for production
```
npm run build
pnpm run build
```

### Lints and formats files
```
npm run lint
pnpm run lint
```

### Type checking
```
npm run typecheck
pnpm run typecheck
```

### Unit tests
```
npm run test:run
pnpm run test:run
```

### E2E tests
```
npm run test:e2e
pnpm run test:e2e
```

See [e2e/README.md](./e2e/README.md) for full details on running and writing E2E tests.
Expand Down
14 changes: 7 additions & 7 deletions client-v3/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ Tests run against a real backend instance with a clean SQLite database, covering

## Prerequisites

* Node 24.x with dependencies installed (`npm ci` in `client-v3/`)
* Node 24.15+ with dependencies installed (`pnpm install` in `client-v3/`)
* Python 3.13.x with dependencies installed (`pip install -r requirements.txt` in `server/`)
* A production build of the frontend (`npm run build` in `client-v3/`)
* A production build of the frontend (`pnpm run build` in `client-v3/`)

The global setup script starts and stops the backend automatically — no manual server management required.

## Running the tests

```bash
# Chromium only (default, fastest)
npm run test:e2e
pnpm run test:e2e

# Firefox only
npm run test:e2e:firefox
pnpm run test:e2e:firefox

# Both browsers
npm run test:e2e:all
pnpm run test:e2e:all

# Open the HTML report from the last run
npm run test:e2e:report
pnpm run test:e2e:report
```

## How it works
Expand Down Expand Up @@ -78,7 +78,7 @@ Failed test runs produce an HTML report and screenshots/videos under `playwright
Open the report with:

```bash
npm run test:e2e:report
pnpm run test:e2e:report
```

Trace files (recorded on failure) can be inspected with the Playwright Trace Viewer.
Expand Down
2 changes: 1 addition & 1 deletion client-v3/e2e/global-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default async function globalSetup(): Promise<void> {
);

// server/ is a sibling of client-v3/ — process.cwd() is client-v3/ when
// invoked via "npm run test:e2e" or with working-directory: ./client-v3 in CI
// invoked via "pnpm run test:e2e" or with working-directory: ./client-v3 in CI
const serverDir = path.resolve(process.cwd(), '..', 'server');

const serverLog = fs.openSync(SERVER_LOG_FILE, 'a');
Expand Down
Loading
Loading