- TypeScript job: pnpm build, vitest, tsc --noEmit - Python job: ruff lint, pytest - Triggers on services/extraction-service/** and packages/extraction/**
73 lines
1.7 KiB
YAML
73 lines
1.7 KiB
YAML
# CI for extraction-service (TypeScript + Python)
|
|
# Triggers on changes to extraction-service or extraction package
|
|
name: CI — Extraction Service
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'services/extraction-service/**'
|
|
- 'packages/extraction/**'
|
|
- 'packages/errors/**'
|
|
- 'packages/cosmos/**'
|
|
- 'packages/config/**'
|
|
- 'packages/auth/**'
|
|
- 'packages/fastify-core/**'
|
|
pull_request:
|
|
branches: [main]
|
|
paths:
|
|
- 'services/extraction-service/**'
|
|
- 'packages/extraction/**'
|
|
|
|
jobs:
|
|
typescript:
|
|
name: TypeScript (build + test)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: pnpm
|
|
|
|
- run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build packages + service
|
|
run: pnpm -r --filter @lysnrai/extraction-service... build
|
|
|
|
- name: Run tests
|
|
run: pnpm --filter @lysnrai/extraction-service test
|
|
|
|
- name: Type check
|
|
run: pnpm --filter @lysnrai/extraction-service exec tsc --noEmit
|
|
|
|
python:
|
|
name: Python sidecar (lint + test)
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: services/extraction-service/python
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
pip install pytest pytest-asyncio httpx ruff
|
|
|
|
- name: Lint
|
|
run: ruff check src/ tests/
|
|
|
|
- name: Test
|
|
run: python -m pytest tests/ -v --tb=short
|