From 225f99cf2ad4c9d65c1952f4b625aae8a1b865f7 Mon Sep 17 00:00:00 2001 From: Cliff Hill Date: Tue, 21 Oct 2025 08:46:09 -0400 Subject: [PATCH] Fixing more CI stuff. Signed-off-by: Cliff Hill --- .gitea/workflows/ci.yml | 81 ++++++++++++++++++++++++++--------------- 1 file changed, 52 insertions(+), 29 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index fba562d..f0db422 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -101,11 +101,12 @@ jobs: env: DATABASE_URL: postgresql://test_user:test_password@localhost:5432/test_db - - name: Upload backend coverage to artifacts - uses: actions/upload-artifact@v3 - with: - name: backend-coverage - path: backend/htmlcov/ + # Temporarily disable artifact upload to debug main tests + # - name: Upload backend coverage to artifacts + # uses: actions/upload-artifact@v4 + # with: + # name: backend-coverage + # path: backend/htmlcov/ frontend-tests: name: Frontend Tests (TypeScript/Vue) @@ -124,30 +125,31 @@ jobs: which yarn || echo "yarn not found" yarn --version || echo "yarn version failed" - - name: Set up Node.js (fallback to manual installation) + - name: Install Node.js and Yarn run: | - # Check if node is available and what version - if command -v node &> /dev/null; then - echo "Node.js found:" - node --version - NODE_VERSION=$(node --version | cut -d'v' -f2 | cut -d'.' -f1) - if [ "$NODE_VERSION" -ge 18 ]; then - echo "Node.js version is sufficient (>= 18)" - else - echo "Node.js version is too old, installing Node 20..." - curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - - sudo apt-get install -y nodejs - fi + echo "=== Installing Node.js and Yarn ===" + echo "Current PATH: $PATH" + echo "Current user: $(whoami)" + echo "Current directory: $(pwd)" + + # Check if Node.js is already installed + if command -v node >/dev/null 2>&1; then + echo "Node.js is already installed: $(node --version)" else - echo "Node.js not found, installing Node 20..." + echo "Installing Node.js..." curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt-get install -y nodejs fi - # Check if yarn is available, if not install it - if ! command -v yarn &> /dev/null; then - echo "Yarn not found, installing..." - npm install -g yarn + # Check if Yarn is already installed + if command -v yarn >/dev/null 2>&1; then + echo "Yarn is already installed: $(yarn --version)" + else + echo "Installing Yarn..." + curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - + echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list + sudo apt-get update + sudo apt-get install -y yarn fi echo "Final versions:" @@ -157,8 +159,19 @@ jobs: - name: Install frontend dependencies run: | + echo "=== Installing frontend dependencies ===" + echo "Current directory: $(pwd)" + echo "Listing current directory contents:" + ls -la + echo "Changing to frontend directory..." cd frontend + echo "Frontend directory contents:" + ls -la + echo "package.json contents:" + cat package.json + echo "Installing dependencies with yarn..." yarn install --frozen-lockfile + echo "Dependencies installed successfully" - name: Run frontend linting (ESLint) run: | @@ -177,15 +190,25 @@ jobs: - name: Run frontend tests with coverage and automatic Zod validation run: | + echo "=== Running frontend tests ===" + echo "Current directory: $(pwd)" cd frontend + echo "Frontend directory contents after install:" + ls -la + echo "node_modules exists: $(test -d node_modules && echo 'yes' || echo 'no')" + echo "Checking yarn configuration:" + yarn config list + echo "Running tests with coverage..." # Zod validation happens automatically in test mode, no explicit .parse() calls needed - yarn test:coverage + yarn test:unit --coverage + echo "Tests completed successfully" - - name: Upload frontend coverage to artifacts - uses: actions/upload-artifact@v3 - with: - name: frontend-coverage - path: frontend/coverage/ + # Temporarily disable artifact upload to debug main tests + # - name: Upload frontend coverage to artifacts + # uses: actions/upload-artifact@v4 + # with: + # name: frontend-coverage + # path: frontend/coverage/ integration-tests: name: Integration Tests