Update CI configuration to use Node 20 and enhance dependency installation process
This commit is contained in:
+3
-10
@@ -194,21 +194,14 @@ jobs:
|
|||||||
if: env.HAS_NODE == 'true'
|
if: env.HAS_NODE == 'true'
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "lts/*"
|
# Keep CI on Node 20 to match runtime/Docker and better-sqlite3 compatibility.
|
||||||
|
node-version: "20.x"
|
||||||
|
|
||||||
- name: Install Node dependencies
|
- name: Install Node dependencies
|
||||||
if: env.HAS_NODE == 'true'
|
if: env.HAS_NODE == 'true'
|
||||||
run: |
|
run: |
|
||||||
# Prefer deterministic install when lockfile is healthy.
|
# Lockfile is currently not authoritative; use install to refresh dependency tree.
|
||||||
# Fallback to npm install if lockfile is out-of-sync.
|
|
||||||
if [ -f package-lock.json ]; then
|
|
||||||
if ! npm ci; then
|
|
||||||
echo "npm ci failed; falling back to npm install"
|
|
||||||
npm install
|
npm install
|
||||||
fi
|
|
||||||
else
|
|
||||||
npm install
|
|
||||||
fi
|
|
||||||
|
|
||||||
# -----------------------------------------------------------------------
|
# -----------------------------------------------------------------------
|
||||||
# Step 9: Node.js — Lint (only if "lint" script exists in package.json)
|
# Step 9: Node.js — Lint (only if "lint" script exists in package.json)
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
"name": "cozy-den",
|
"name": "cozy-den",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20 <24"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "astro dev",
|
"dev": "astro dev",
|
||||||
"start": "astro dev",
|
"start": "astro dev",
|
||||||
|
|||||||
Reference in New Issue
Block a user