Fixing more CI stuff.
Some checks failed
CI/CD Pipeline / Frontend Tests (TypeScript/Vue) (push) Failing after 6m46s
CI/CD Pipeline / Backend Tests (Python) (push) Failing after 7m53s
CI/CD Pipeline / Integration Tests (push) Has been skipped

Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
This commit is contained in:
2025-10-21 08:46:09 -04:00
parent 0961001998
commit 225f99cf2a

View File

@@ -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