Skip to content

chore(repo): expand repository metadata files and standardize documen… #1

chore(repo): expand repository metadata files and standardize documen…

chore(repo): expand repository metadata files and standardize documen… #1

Workflow file for this run

name: CI
on:
push:
branches: [Public-Api, main]
pull_request:
branches: [Public-Api, main]
jobs:
test:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.13"]
defaults:
run:
working-directory: espn_service
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: espn_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/espn_test
SECRET_KEY: ci-test-secret-key-not-for-production
DEBUG: "False"
CELERY_BROKER_URL: ""
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: espn_service/pyproject.toml
- name: Install dependencies
run: pip install -e ".[dev]"
- name: Run migrations
run: python manage.py migrate --settings=config.settings.test
- name: Run tests (no coverage threshold in CI)
run: python -m pytest tests/ --no-cov -q
- name: Run tests with coverage (report only, no fail-under)
run: python -m pytest tests/ --cov=apps --cov=clients --cov-report=term-missing --cov-report=xml -p no:cov --override-ini="addopts=" -q
continue-on-error: true
- name: Upload coverage to Codecov
if: matrix.python-version == '3.12'
uses: codecov/codecov-action@v4
with:
file: espn_service/coverage.xml
flags: unittests
fail_ci_if_error: false