Some checks failed
CI/CD Pipeline / Frontend Tests (TypeScript/Vue) (push) Failing after 6m36s
Basic Test / Basic Test (push) Failing after 6m45s
CI/CD Pipeline / Backend Tests (Python) (push) Failing after 6m48s
CI/CD Pipeline / Integration Tests (push) Has been skipped
Minimal Test / Minimal Backend Test (push) Successful in 1m23s
Minimal Test / Minimal Frontend Test (push) Successful in 2m1s
Working CI / Frontend Tests (TypeScript/Vue) (push) Failing after 6m15s
Working CI / Backend Tests (Python) (push) Failing after 8m30s
Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
99 lines
2.4 KiB
YAML
99 lines
2.4 KiB
YAML
name: Working CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, develop, feature/* ]
|
|
pull_request:
|
|
branches: [ main, develop ]
|
|
|
|
jobs:
|
|
backend-tests:
|
|
name: Backend Tests (Python)
|
|
runs-on: ubuntu-latest
|
|
container: python:3.13-slim
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
env:
|
|
POSTGRES_PASSWORD: test_password
|
|
POSTGRES_USER: test_user
|
|
POSTGRES_DB: test_db
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
|
|
steps:
|
|
- name: Install git and basic tools
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y git curl
|
|
|
|
- name: Checkout code
|
|
run: |
|
|
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git .
|
|
git checkout $GITHUB_SHA
|
|
|
|
- name: Install uv
|
|
run: |
|
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
|
|
|
- name: Setup backend environment
|
|
run: |
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
|
cd backend
|
|
uv venv
|
|
source .venv/bin/activate
|
|
uv pip install -e .
|
|
|
|
- name: Run backend tests with coverage and typeguard
|
|
run: |
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
|
cd backend
|
|
source .venv/bin/activate
|
|
python -m pytest tests/ -v \
|
|
--cov=src \
|
|
--cov-report=html \
|
|
--cov-report=term \
|
|
--typeguard-packages=backend,src
|
|
env:
|
|
DATABASE_URL: postgresql://test_user:test_password@postgres:5432/test_db
|
|
|
|
frontend-tests:
|
|
name: Frontend Tests (TypeScript/Vue)
|
|
runs-on: ubuntu-latest
|
|
container: node:20-slim
|
|
|
|
steps:
|
|
- name: Install git and basic tools
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y git curl
|
|
|
|
- name: Checkout code
|
|
run: |
|
|
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git .
|
|
git checkout $GITHUB_SHA
|
|
|
|
- name: Install yarn
|
|
run: |
|
|
npm install -g yarn
|
|
|
|
- name: Setup frontend environment
|
|
run: |
|
|
cd frontend
|
|
yarn install --frozen-lockfile
|
|
|
|
- name: Run frontend tests with coverage
|
|
run: |
|
|
cd frontend
|
|
yarn test:unit --coverage
|
|
|
|
- name: Run type checking
|
|
run: |
|
|
cd frontend
|
|
yarn type-check
|