mirror of
https://github.com/linuxserver/Heimdall.git
synced 2026-08-07 07:16:13 +00:00
Fix CI: pin Node 24 and install frontend deps with npm ci
CI ran `yarn && yarn dev` with no committed yarn.lock, so every run resolved the latest matching versions and dependency drift broke the pipeline in two independent ways: - select2 4.1.0 added engines.node ">=24" but the runner used node 22, so `yarn install` failed outright on every pull request. - webpack 5.108 removed lib/SizeFormatHelpers, which laravel-mix 6 still requires, so `yarn dev` would have failed the build regardless of node. Switch the workflow to `npm ci`, which installs the exact, known-good versions already pinned in package-lock.json (select2 4.0.13, webpack 5.100.1) and is verified to build and lint cleanly. Pin the runner to node 24 via actions/setup-node so the toolchain is explicit rather than tracking the runner default. Also pin select2 to ~4.0.13 in package.json so a future `npm install` cannot pull the incompatible 4.1.0 back in.
This commit is contained in:
@@ -31,17 +31,17 @@ jobs:
|
||||
cp .env.example .env
|
||||
php artisan key:generate
|
||||
|
||||
- name: Cache yarn dependencies
|
||||
uses: actions/cache@v4
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
path: node_modules
|
||||
key: yarn-${{ hashFiles('yarn.lock') }}
|
||||
node-version: '24'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Run yarn
|
||||
run: yarn && yarn dev
|
||||
- name: Install node modules and build assets
|
||||
run: npm ci && npm run dev
|
||||
|
||||
- name: Run ESLint
|
||||
run: yarn lint
|
||||
run: npm run lint
|
||||
|
||||
- name: Run tests
|
||||
run: php artisan test
|
||||
|
||||
Reference in New Issue
Block a user