Skip to content

fix: MED-32 test isolation β€” clear cache and use patch.object #27

fix: MED-32 test isolation β€” clear cache and use patch.object

fix: MED-32 test isolation β€” clear cache and use patch.object #27

Workflow file for this run

name: Studio Tests
on:
push:
branches: [main]
paths:
- "web_strategy_studio/**"
- ".github/workflows/studio-test.yml"
pull_request:
branches: [main]
paths:
- "web_strategy_studio/**"
- ".github/workflows/studio-test.yml"
types: [opened, synchronize, reopened]
permissions:
contents: read
jobs:
backend:
name: Backend (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
defaults:
run:
working-directory: web_strategy_studio/backend
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install eqlib (root package)
working-directory: .
run: pip install -e .
- name: Install backend
run: pip install -e ".[dev]"
- name: Ruff lint
run: ruff check .
- name: Black format check
run: black --check .
- name: Run backend tests
run: pytest tests/ -v --tb=short
frontend:
name: Frontend
runs-on: ubuntu-latest
defaults:
run:
working-directory: web_strategy_studio/frontend
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: web_strategy_studio/frontend/package-lock.json
- name: Install dependencies
run: npm ci
- name: TypeScript type check
run: npm run typecheck
- name: ESLint
run: npm run lint:eslint
- name: Run unit tests
run: npm run test
e2e:
name: E2E (Playwright smoke)
runs-on: ubuntu-latest
if: ${{ false }} # Optional gate β€” enable once e2e tests are authored
defaults:
run:
working-directory: web_strategy_studio/frontend
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: web_strategy_studio/frontend/package-lock.json
- name: Install dependencies
run: npm ci
- name: Install Playwright browsers
run: npx playwright install --with-deps chromium
- name: Run e2e tests
run: npm run test:e2e