Skip to content

Fix saved research origin validation #16

Fix saved research origin validation

Fix saved research origin validation #16

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main, "agent/**"]
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
configuration:
name: Configuration and secrets
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- run: python -m pip install --disable-pip-version-check PyYAML==6.0.2
- run: python scripts/ci/validate_config.py
- run: docker compose config --quiet
- run: scripts/ci/check-secrets.sh
- uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
python:
name: Python quality gates
runs-on: ubuntu-latest
services:
postgis:
image: postgis/postgis:17-3.5
env:
POSTGRES_DB: seekandscore_test
POSTGRES_USER: seekandscore
POSTGRES_PASSWORD: seekandscore
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U seekandscore -d seekandscore_test"
--health-interval 5s
--health-timeout 5s
--health-retries 20
redis:
image: redis:7.4-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 5s
--health-timeout 3s
--health-retries 20
env:
APP_ENV: test
DATABASE_URL: postgresql+psycopg://seekandscore:seekandscore@localhost:5432/seekandscore_test
REDIS_URL: redis://localhost:6379/15
DATASET_MODE: live
INGESTION_ENABLED: "false"
OUTREACH_MODE: disabled
OUTREACH_SEND_ENABLED: "false"
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
version: "0.8.13"
enable-cache: true
- run: uv sync --frozen --group dev
- run: uv run ruff check python services tests/backend migrations
- run: uv run ruff format --check python services tests/backend migrations
- run: uv run mypy python services
- run: env -u DATABASE_URL uv run pytest tests/backend
- run: uv run python -m seekandscore.db.migrate upgrade
- name: PostGIS repository integration
run: >-
SEEKANDSCORE_TEST_DATABASE_URL="$DATABASE_URL" env -u DATABASE_URL uv run pytest
tests/backend/test_postgres_repository_integration.py
tests/backend/test_database_roles_integration.py
tests/backend/test_opportunity_zones.py
web:
name: Web quality gates
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.2.1
- uses: actions/setup-node@v4
with:
node-version: "22.14.0"
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm check
containers:
name: Container build (${{ matrix.name }})
runs-on: ubuntu-latest
needs: [configuration, python, web]
strategy:
fail-fast: false
matrix:
include:
- name: api
dockerfile: infra/docker/api.Dockerfile
- name: worker
dockerfile: infra/docker/worker.Dockerfile
- name: db-migrate
dockerfile: infra/docker/db-migrate.Dockerfile
- name: web
dockerfile: infra/docker/web.Dockerfile
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v6
with:
context: .
file: ${{ matrix.dockerfile }}
push: false
tags: seekandscore/${{ matrix.name }}:ci
cache-from: type=gha,scope=${{ matrix.name }}
cache-to: type=gha,mode=max,scope=${{ matrix.name }}