Skip to content

Update server-tests.yml to include MongoDB installation and adjust en… #21

Update server-tests.yml to include MongoDB installation and adjust en…

Update server-tests.yml to include MongoDB installation and adjust en… #21

Workflow file for this run

name: Server Tests
on:
push:
branches:
- main
paths:
- "server/**"
- ".github/workflows/server-tests.yml"
pull_request:
branches:
- main
paths:
- "server/**"
- ".github/workflows/server-tests.yml"
jobs:
test-server:
runs-on: ubuntu-latest
container:
image: node:20-alpine
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install system dependencies
run: apk add --no-cache python3 make g++ vips-dev mongodb
- name: Install dependencies in server directory
run: |
cd server
npm install --platform=linux --libc=musl
- name: Run tests in server directory
env:
MONGOMS_SYSTEM_BINARY: /usr/bin/mongod
run: npm test
working-directory: ./server