Skip to content

fix: mongo in ci

fix: mongo in ci #15

Workflow file for this run

name: CI
on:
push:
branches: [ "master"]
paths-ignore:
- "README.md"
pull_request:
branches: [ "master" ]
jobs:
test:
services:
mongo:
image: mongo:6.0.20
ports:
- 27017:27017
options: >-
--health-cmd "mongosh --eval 'db.runCommand(\"ping\")'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
MONGODB_URI: mongodb://localhost:27017
strategy:
matrix:
directory: [ "./backend" ]
name: 🎉 Test
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: ${{ matrix.directory }}/.nvmrc
- name: 📦 Install dependencies
working-directory: ${{ matrix.directory }}
run: npm ci
- name: Linter
working-directory: ${{ matrix.directory }}
run: npm run lint
- name: Test
working-directory: ${{ matrix.directory }}
run: npm test