Skip to content

chore(deps)(deps-dev): bump eslint-config-prettier from 9.1.2 to 10.1.8 in /rag-api #3

chore(deps)(deps-dev): bump eslint-config-prettier from 9.1.2 to 10.1.8 in /rag-api

chore(deps)(deps-dev): bump eslint-config-prettier from 9.1.2 to 10.1.8 in /rag-api #3

Workflow file for this run

name: CI - Test Backend
on:
push:
branches: [main, develop]
paths:
- 'rag-api/**'
- '.github/workflows/test-backend.yml'
pull_request:
branches: [main, develop]
paths:
- 'rag-api/**'
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./rag-api
services:
postgres:
image: pgvector/pgvector:pg16
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: './rag-api/package-lock.json'
- name: Install dependencies
run: npm ci
- name: Generate Prisma client
run: npx prisma generate
- name: Run migrations
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
run: npx prisma migrate deploy
- name: Run linter
run: npm run lint
- name: Run tests
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
OLLAMA_URL: http://localhost:11434
run: npm run test -- --coverage
- name: Upload coverage
uses: codecov/codecov-action@v3
with:
directory: ./rag-api/coverage
flags: backend
name: backend-coverage