Skip to content

update in docker-compose file #5

update in docker-compose file

update in docker-compose file #5

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
lint-and-test:
name: Lint & Test
runs-on: ubuntu-latest
services:
mongodb:
image: mongo:7
ports:
- 27017:27017
options: >-
--health-cmd "mongosh --eval \"db.adminCommand('ping')\""
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Run tests
run: npm run test:run
env:
NODE_ENV: test
MONGO_URI: mongodb://localhost:27017/lexai_test
REDIS_HOST: localhost
REDIS_PORT: 6379
REDIS_PASSWORD: ''
PASETO_LOCAL_SECRET: test-secret-that-is-at-least-32-characters-long
PASETO_ACCESS_EXPIRY: 15m
PASETO_REFRESH_EXPIRY: 7d
PASETO_REFRESH_COOKIE_MAX_AGE_MS: 604800000
RABBITMQ_URL: amqp://guest:guest@localhost:5672
ANALYSIS_QUEUE: lexai.analysis.queue
ALERT_QUEUE: lexai.alert.queue
DLX_EXCHANGE: lexai.dlx
OPENROUTER_API_KEY: test-key
OPENROUTER_BASE_URL: https://openrouter.ai/api/v1
AI_PRIMARY_MODEL: meta-llama/llama-3.1-8b-instruct:free
AI_FALLBACK_MODEL: mistralai/mistral-7b-instruct:free
- name: Upload coverage
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-report
path: coverage/
docker-build:
name: Docker Build Check
runs-on: ubuntu-latest
needs: lint-and-test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build API image
run: docker build --target production -f Dockerfile .
- name: Build Worker image
run: docker build --target production -f Dockerfile.worker .