Skip to content

fix(runtime): separate polling timer and abort controller refs #72

fix(runtime): separate polling timer and abort controller refs

fix(runtime): separate polling timer and abort controller refs #72

Workflow file for this run

name: CI
on:
push:
branches: [main, develop, 'phase/**']
pull_request:
branches: [main, develop]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.32.1
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm db:generate
- run: pnpm lint
typecheck:
name: Type Check
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.32.1
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm db:generate
- run: pnpm typecheck
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
CV_WORKER_URL: http://localhost:8000
format:
name: Format Check
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.32.1
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm format:check
env:
CI: 'true'
pytest:
name: Pytest
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: actions/cache@v4
with:
path: ~/.cache/pip
key: pip-pytest-${{ runner.os }}-${{ hashFiles('apps/cv-worker/requirements-dev.txt') }}
restore-keys: |
pip-pytest-${{ runner.os }}-
- name: Install Python dependencies
run: |
pip install -r apps/cv-worker/requirements-dev.txt
- run: cd apps/cv-worker && python -m pytest tests/ -v
test:
name: Test
runs-on: ubuntu-latest
needs: lint
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.32.1
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm db:generate
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
- run: pnpm db:push
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
- run: pnpm test
env:
CI: 'true'
DATABASE_URL: postgresql://test:test@localhost:5432/test
WEB_ORIGIN: http://localhost:5173
- uses: actions/upload-artifact@v4
if: always()
with:
name: coverage
path: '**/coverage/'
retention-days: 7
db-harness:
name: DB Harness
runs-on: ubuntu-latest
needs: [typecheck, test]
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.32.1
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- run: pnpm install
- run: pnpm db:generate
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
- run: pnpm db:push
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
- run: pnpm build
- run: pnpm seed:db -- --reset
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
- run: pnpm harness:phase20c
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
- run: pnpm harness:phase20d
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
- run: pnpm harness:phase20e
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
migration-chain:
name: Migration Chain
runs-on: ubuntu-latest
needs: [lint]
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.32.1
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- run: pnpm install
- run: pnpm db:generate
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
- run: pnpm build
- name: Run prisma migrate deploy (fresh DB)
run: pnpm db:migrate:deploy
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
- name: Verify migration status
run: pnpm db:migrate:status
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
- run: pnpm seed:db -- --reset
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
- run: pnpm harness:phase20c
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
- run: pnpm harness:phase20d
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
- run: pnpm harness:phase20e
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
- run: pnpm harness:phase20f
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
build:
name: Build
runs-on: ubuntu-latest
needs: [typecheck, format, pytest, test, db-harness, migration-chain]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.32.1
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm db:generate
- run: pnpm build
env:
DATABASE_URL: postgresql://test:test@localhost:5432/test
CV_WORKER_URL: http://localhost:8000
- uses: actions/upload-artifact@v4
if: always()
with:
name: dist
path: '**/dist/'
retention-days: 1