ci: add node.js precheck and conditional install before checkout

This commit is contained in:
2026-09-07 09:05:25 -07:00
parent a05e7899d5
commit 8add2c44de
2 changed files with 45 additions and 2 deletions
+15 -2
View File
@@ -17,10 +17,23 @@ jobs:
name: CI
runs-on: rust
steps:
- name: Install Node.js and Docker
- name: Check and install Node.js if missing
shell: bash
run: |
echo "=== Node.js Installation Check ==="
if command -v node &>/dev/null; then
echo "✓ Node.js already installed: $(node --version)"
else
echo "⚠ Node.js not found, installing..."
apt-get update
apt-get install -y nodejs
fi
echo "✓ npm version: $(npm --version)"
- name: Install Docker
run: |
apt-get update
apt-get install -y nodejs docker.io
apt-get install -y docker.io
- name: Checkout code
uses: actions/checkout@v4