|
|
|
|
@@ -30,12 +30,35 @@ jobs:
|
|
|
|
|
- name: Checkout code
|
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
|
|
- name: Set up Python 3.13
|
|
|
|
|
uses: actions/setup-python@v5
|
|
|
|
|
with:
|
|
|
|
|
python-version: '3.13'
|
|
|
|
|
- name: Debug Python availability
|
|
|
|
|
run: |
|
|
|
|
|
which python3 || echo "python3 not found"
|
|
|
|
|
python3 --version || echo "python3 version failed"
|
|
|
|
|
which python || echo "python not found"
|
|
|
|
|
python --version || echo "python version failed"
|
|
|
|
|
ls -la /usr/bin/python* || echo "no python in /usr/bin"
|
|
|
|
|
|
|
|
|
|
- name: Install uv
|
|
|
|
|
- name: Set up Python (fallback to system Python)
|
|
|
|
|
run: |
|
|
|
|
|
# Try to use system Python first
|
|
|
|
|
if command -v python3 &> /dev/null; then
|
|
|
|
|
echo "Using system Python3:"
|
|
|
|
|
python3 --version
|
|
|
|
|
# Create symlink if python command doesn't exist
|
|
|
|
|
if ! command -v python &> /dev/null; then
|
|
|
|
|
sudo ln -sf $(which python3) /usr/local/bin/python
|
|
|
|
|
fi
|
|
|
|
|
else
|
|
|
|
|
echo "No Python found, attempting to install..."
|
|
|
|
|
sudo apt-get update
|
|
|
|
|
sudo apt-get install -y python3 python3-pip python3-venv
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "Final Python setup:"
|
|
|
|
|
python3 --version
|
|
|
|
|
python --version || echo "python symlink not available"
|
|
|
|
|
|
|
|
|
|
- name: Install uv (Python package manager)
|
|
|
|
|
run: |
|
|
|
|
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
|
|
|
export PATH="$HOME/.local/bin:$PATH"
|
|
|
|
|
@@ -92,12 +115,45 @@ jobs:
|
|
|
|
|
- name: Checkout code
|
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
|
|
- name: Set up Node.js
|
|
|
|
|
uses: actions/setup-node@v4
|
|
|
|
|
with:
|
|
|
|
|
node-version: '20'
|
|
|
|
|
cache: 'yarn'
|
|
|
|
|
cache-dependency-path: frontend/yarn.lock
|
|
|
|
|
- name: Debug Node.js availability
|
|
|
|
|
run: |
|
|
|
|
|
which node || echo "node not found"
|
|
|
|
|
node --version || echo "node version failed"
|
|
|
|
|
which npm || echo "npm not found"
|
|
|
|
|
npm --version || echo "npm version failed"
|
|
|
|
|
which yarn || echo "yarn not found"
|
|
|
|
|
yarn --version || echo "yarn version failed"
|
|
|
|
|
|
|
|
|
|
- name: Set up Node.js (fallback to manual installation)
|
|
|
|
|
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
|
|
|
|
|
else
|
|
|
|
|
echo "Node.js not found, installing Node 20..."
|
|
|
|
|
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
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "Final versions:"
|
|
|
|
|
node --version
|
|
|
|
|
npm --version
|
|
|
|
|
yarn --version
|
|
|
|
|
|
|
|
|
|
- name: Install frontend dependencies
|
|
|
|
|
run: |
|
|
|
|
|
|