fix(build): update npm ci to npm install

This commit is contained in:
perf3ct
2025-06-22 22:27:05 +00:00
parent 9b3cdbabfb
commit 182465341a
7 changed files with 18 additions and 20 deletions

View File

@@ -16,7 +16,7 @@ env:
jobs:
e2e-tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
@@ -54,8 +54,8 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
node-version: "20"
cache: "npm"
cache-dependency-path: frontend/package-lock.json
- name: Cache cargo registry
@@ -69,7 +69,6 @@ jobs:
restore-keys: |
${{ runner.os }}-cargo-
- name: Build backend
run: cargo build --release
env:
@@ -79,7 +78,7 @@ jobs:
- name: Build frontend
working-directory: ./frontend
run: |
npm ci
npm install
npm run build
- name: Start backend server
@@ -106,7 +105,6 @@ jobs:
sleep 2
done
- name: Install Playwright browsers
working-directory: ./frontend
run: npx playwright install --with-deps
@@ -124,4 +122,4 @@ jobs:
if [ -f backend.pid ]; then
kill $(cat backend.pid) || true
rm backend.pid
fi
fi

View File

@@ -16,7 +16,7 @@ env:
jobs:
rust-unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -66,11 +66,11 @@ jobs:
frontend-unit-tests:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -78,15 +78,15 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
node-version: "20"
cache: "npm"
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
run: npm ci
run: npm install
- name: Run type checking
run: npm run type-check
- name: Run unit tests
run: npm test -- --run
run: npm test -- --run

View File

@@ -3,7 +3,7 @@ FROM node:20-bookworm as frontend-builder
WORKDIR /frontend
COPY frontend/package*.json ./
RUN npm ci
RUN npm install
COPY frontend ./
RUN npm run build

View File

@@ -99,7 +99,7 @@ services:
volumes:
- ./frontend:/app:ro
- /app/node_modules # Prevent mounting host node_modules
command: ["sh", "-c", "npm ci && npm test -- --run --reporter=verbose"]
command: ["sh", "-c", "npm install && npm test -- --run --reporter=verbose"]
networks:
- readur_test_network
profiles:
@@ -118,7 +118,7 @@ services:
volumes:
- ./frontend:/app
- /app/node_modules
command: ["sh", "-c", "npm ci && npm run dev -- --host 0.0.0.0 --port 5174"]
command: ["sh", "-c", "npm install && npm run dev -- --host 0.0.0.0 --port 5174"]
ports:
- "5174:5174"
networks:

View File

@@ -545,7 +545,7 @@ jobs:
- name: Install Dependencies
working-directory: frontend
run: npm ci
run: npm install
- name: Run Frontend Tests
working-directory: frontend

View File

@@ -302,7 +302,7 @@ run_e2e_tests() {
# Install dependencies if not already installed
if [ ! -d "node_modules" ]; then
print_status "Installing frontend dependencies..."
npm ci
npm install
fi
# Install Playwright browsers if not already installed

View File

@@ -162,7 +162,7 @@ main() {
# Install frontend dependencies
print_status "Installing frontend dependencies..."
cd frontend
npm ci
npm install
# Install Playwright browsers
print_status "Installing Playwright browsers..."