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: env:
DATABASE_URL: postgresql://test_user:test_password@localhost:5432/test_db DATABASE_URL: postgresql://test_user:test_password@localhost:5432/test_db
- name: Upload backend coverage to artifacts # Temporarily disable artifact upload to debug main tests
uses: actions/upload-artifact@v3 # - name: Upload backend coverage to artifacts
with: # uses: actions/upload-artifact@v4
name: backend-coverage # with:
path: backend/htmlcov/ # name: backend-coverage
# path: backend/htmlcov/
frontend-tests: frontend-tests:
name: Frontend Tests (TypeScript/Vue) name: Frontend Tests (TypeScript/Vue)
@@ -124,30 +125,31 @@ jobs:
which yarn || echo "yarn not found" which yarn || echo "yarn not found"
yarn --version || echo "yarn version failed" yarn --version || echo "yarn version failed"
- name: Set up Node.js (fallback to manual installation) - name: Install Node.js and Yarn
run: | run: |
# Check if node is available and what version echo "=== Installing Node.js and Yarn ==="
if command -v node &> /dev/null; then echo "Current PATH: $PATH"
echo "Node.js found:" echo "Current user: $(whoami)"
node --version echo "Current directory: $(pwd)"
NODE_VERSION=$(node --version | cut -d'v' -f2 | cut -d'.' -f1)
if [ "$NODE_VERSION" -ge 18 ]; then # Check if Node.js is already installed
echo "Node.js version is sufficient (>= 18)" if command -v node >/dev/null 2>&1; then
else echo "Node.js is already installed: $(node --version)"
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
else 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 - curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs sudo apt-get install -y nodejs
fi fi
# Check if yarn is available, if not install it # Check if Yarn is already installed
if ! command -v yarn &> /dev/null; then if command -v yarn >/dev/null 2>&1; then
echo "Yarn not found, installing..." echo "Yarn is already installed: $(yarn --version)"
npm install -g yarn 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 fi
echo "Final versions:" echo "Final versions:"
@@ -157,8 +159,19 @@ jobs:
- name: Install frontend dependencies - name: Install frontend dependencies
run: | run: |
echo "=== Installing frontend dependencies ==="
echo "Current directory: $(pwd)"
echo "Listing current directory contents:"
ls -la
echo "Changing to frontend directory..."
cd frontend cd frontend
echo "Frontend directory contents:"
ls -la
echo "package.json contents:"
cat package.json
echo "Installing dependencies with yarn..."
yarn install --frozen-lockfile yarn install --frozen-lockfile
echo "Dependencies installed successfully"
- name: Run frontend linting (ESLint) - name: Run frontend linting (ESLint)
run: | run: |
@@ -177,15 +190,25 @@ jobs:
- name: Run frontend tests with coverage and automatic Zod validation - name: Run frontend tests with coverage and automatic Zod validation
run: | run: |
echo "=== Running frontend tests ==="
echo "Current directory: $(pwd)"
cd frontend 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 # 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 # Temporarily disable artifact upload to debug main tests
uses: actions/upload-artifact@v3 # - name: Upload frontend coverage to artifacts
with: # uses: actions/upload-artifact@v4
name: frontend-coverage # with:
path: frontend/coverage/ # name: frontend-coverage
# path: frontend/coverage/
integration-tests: integration-tests:
name: Integration Tests name: Integration Tests