Skip to content
Closed
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
41 changes: 41 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Node.js CI

on:
push:
branches: ["master"]
pull_request:
branches: ["master"]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4

# Set the working directory for subsequent commands
- run: cd server

- name: Use Node.js ${{ matrix.node-version }}
working-directory: server
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"

# Use npm ci with the working directory option
- run: npm ci
working-directory: server

# Build the project with the working directory option
- run: npm run build --if-present
working-directory: server

# Run tests with the working directory option
- run: npm test
working-directory: server