diff --git a/.gitea/workflows/test-basic.yml b/.gitea/workflows/test-basic.yml new file mode 100644 index 0000000..a8af6cf --- /dev/null +++ b/.gitea/workflows/test-basic.yml @@ -0,0 +1,32 @@ +name: Basic Test + +on: + push: + branches: [ main, develop, feature/* ] + pull_request: + branches: [ main, develop ] + +jobs: + basic-test: + name: Basic Test + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Simple test + run: | + echo "=== Basic Test Starting ===" + echo "Current working directory: $(pwd)" + echo "Current user: $(whoami)" + echo "Available Python versions:" + ls -la /usr/bin/python* || echo "No python found in /usr/bin" + which python3 || echo "python3 not in PATH" + python3 --version || echo "python3 version failed" + echo "Available Node versions:" + which node || echo "node not in PATH" + node --version || echo "node version failed" + echo "Directory contents:" + ls -la + echo "=== Basic Test Complete ===" diff --git a/.gitea/workflows/test-minimal.yml b/.gitea/workflows/test-minimal.yml new file mode 100644 index 0000000..8eb7d48 --- /dev/null +++ b/.gitea/workflows/test-minimal.yml @@ -0,0 +1,48 @@ +name: Minimal Test + +on: + push: + branches: [ main, develop, feature/* ] + pull_request: + branches: [ main, develop ] + +jobs: + minimal-backend: + name: Minimal Backend Test + runs-on: ubuntu-latest + container: python:3.13-slim + + steps: + - name: Manual checkout and test + run: | + echo "=== Starting Minimal Backend Test ===" + echo "Container info:" + cat /etc/os-release + echo "Python version:" + python --version + echo "Working directory:" + pwd + echo "Contents:" + ls -la + echo "=== End Minimal Backend Test ===" + + minimal-frontend: + name: Minimal Frontend Test + runs-on: ubuntu-latest + container: node:20-slim + + steps: + - name: Manual checkout and test + run: | + echo "=== Starting Minimal Frontend Test ===" + echo "Container info:" + cat /etc/os-release + echo "Node version:" + node --version + echo "npm version:" + npm --version + echo "Working directory:" + pwd + echo "Contents:" + ls -la + echo "=== End Minimal Frontend Test ===" diff --git a/.gitea/workflows/test-working.yml b/.gitea/workflows/test-working.yml new file mode 100644 index 0000000..7b1231c --- /dev/null +++ b/.gitea/workflows/test-working.yml @@ -0,0 +1,98 @@ +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