Skip to content

Fix: Architecture issues for CI/CD Quality Assurance #8

Fix: Architecture issues for CI/CD Quality Assurance

Fix: Architecture issues for CI/CD Quality Assurance #8

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: pgvector/pgvector:pg15
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: app_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
run: |
poetry install
- name: Check code formatting with Black
run: |
poetry run black --check app tests
- name: Lint with Ruff
run: |
poetry run ruff check .
- name: Type check with MyPy
run: |
poetry run mypy .
- name: Run tests
env:
POSTGRES_SERVER: localhost
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: app_test
ENVIRONMENT: testing
# Secrets for CI
JWT_SECRET_KEY: testing_secret_key_change_me_in_prod_12345
API_KEY_SECRET: testing_api_key_secret_change_me_12345
run: |
poetry run pytest --cov=app --cov-report=xml