Working v2 added.
Some checks failed
Working CI / Backend Tests (Python) (push) Has been cancelled
Working CI / Frontend Tests (TypeScript/Vue) (push) Has been cancelled
Minimal Test / Minimal Backend Test (push) Has been cancelled
Minimal Test / Minimal Frontend Test (push) Has been cancelled
Basic Test / Basic Test (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Tests (TypeScript/Vue) (push) Has been cancelled
CI/CD Pipeline / Backend Tests (Python) (push) Has been cancelled
Working CI v2 / Backend Tests (Python) (push) Failing after 4m0s
Working CI v2 / Frontend Tests (TypeScript/Vue) (push) Failing after 5m5s
Some checks failed
Working CI / Backend Tests (Python) (push) Has been cancelled
Working CI / Frontend Tests (TypeScript/Vue) (push) Has been cancelled
Minimal Test / Minimal Backend Test (push) Has been cancelled
Minimal Test / Minimal Frontend Test (push) Has been cancelled
Basic Test / Basic Test (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Tests (TypeScript/Vue) (push) Has been cancelled
CI/CD Pipeline / Backend Tests (Python) (push) Has been cancelled
Working CI v2 / Backend Tests (Python) (push) Failing after 4m0s
Working CI v2 / Frontend Tests (TypeScript/Vue) (push) Failing after 5m5s
Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
This commit is contained in:
133
.gitea/workflows/test-working-v2.yml
Normal file
133
.gitea/workflows/test-working-v2.yml
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
name: Working CI v2
|
||||||
|
|
||||||
|
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
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Verify checkout
|
||||||
|
run: |
|
||||||
|
echo "=== Verifying repository checkout ==="
|
||||||
|
pwd
|
||||||
|
ls -la
|
||||||
|
echo "Backend directory exists: $(test -d backend && echo 'yes' || echo 'no')"
|
||||||
|
if [ -d backend ]; then
|
||||||
|
echo "Backend contents:"
|
||||||
|
ls -la backend/
|
||||||
|
echo "pyproject.toml exists: $(test -f backend/pyproject.toml && echo 'yes' || echo 'no')"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Install uv
|
||||||
|
run: |
|
||||||
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
|
export PATH="$HOME/.cargo/bin:$PATH"
|
||||||
|
uv --version
|
||||||
|
|
||||||
|
- name: Setup backend environment
|
||||||
|
run: |
|
||||||
|
export PATH="$HOME/.cargo/bin:$PATH"
|
||||||
|
cd backend
|
||||||
|
echo "=== Setting up Python environment ==="
|
||||||
|
uv venv
|
||||||
|
source .venv/bin/activate
|
||||||
|
echo "Virtual environment activated"
|
||||||
|
echo "Installing dependencies..."
|
||||||
|
uv pip install -e .
|
||||||
|
echo "Dependencies installed"
|
||||||
|
echo "Verifying installation:"
|
||||||
|
python -c "import backend; print('Backend module imported successfully')"
|
||||||
|
|
||||||
|
- name: Run backend tests with coverage and typeguard
|
||||||
|
run: |
|
||||||
|
export PATH="$HOME/.cargo/bin:$PATH"
|
||||||
|
cd backend
|
||||||
|
source .venv/bin/activate
|
||||||
|
echo "=== Running backend tests ==="
|
||||||
|
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
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Verify checkout
|
||||||
|
run: |
|
||||||
|
echo "=== Verifying repository checkout ==="
|
||||||
|
pwd
|
||||||
|
ls -la
|
||||||
|
echo "Frontend directory exists: $(test -d frontend && echo 'yes' || echo 'no')"
|
||||||
|
if [ -d frontend ]; then
|
||||||
|
echo "Frontend contents:"
|
||||||
|
ls -la frontend/
|
||||||
|
echo "package.json exists: $(test -f frontend/package.json && echo 'yes' || echo 'no')"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Install yarn
|
||||||
|
run: |
|
||||||
|
npm install -g yarn
|
||||||
|
yarn --version
|
||||||
|
|
||||||
|
- name: Setup frontend environment
|
||||||
|
run: |
|
||||||
|
cd frontend
|
||||||
|
echo "=== Installing frontend dependencies ==="
|
||||||
|
yarn install --frozen-lockfile
|
||||||
|
echo "Dependencies installed"
|
||||||
|
echo "Verifying installation:"
|
||||||
|
yarn list --depth=0
|
||||||
|
|
||||||
|
- name: Run frontend type checking
|
||||||
|
run: |
|
||||||
|
cd frontend
|
||||||
|
echo "=== Running type checking ==="
|
||||||
|
yarn type-check
|
||||||
|
|
||||||
|
- name: Run frontend tests with coverage
|
||||||
|
run: |
|
||||||
|
cd frontend
|
||||||
|
echo "=== Running frontend tests ==="
|
||||||
|
yarn test:unit --coverage
|
||||||
Reference in New Issue
Block a user