mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-04-29 14:35:57 +02:00
f8495e4b36
Found The workflow installs test deps from the repo root (uv sync --group test), but pytest is defined in backend/pyproject.toml, so it never gets installed for the backend environment. I’m updating CI to sync the backend project explicitly before running tests.
45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
name: CI — Lint & Test
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
frontend:
|
|
name: Frontend Tests
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: frontend
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: frontend/package-lock.json
|
|
- run: npm ci
|
|
- run: npx vitest run --reporter=verbose
|
|
|
|
backend:
|
|
name: Backend Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v7
|
|
with:
|
|
enable-cache: true
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version-file: "pyproject.toml"
|
|
- name: Install dependencies
|
|
run: uv sync --directory backend --group test
|
|
- run: uv run --directory backend python -c "from services.fetchers.retry import with_retry; from services.env_check import validate_env; print('Module imports OK')"
|
|
- name: Run tests
|
|
run: uv run --directory backend pytest tests -v --tb=short
|