From 182465341aac47c0e7dc40397992ba5de7b22e19 Mon Sep 17 00:00:00 2001 From: perf3ct Date: Sun, 22 Jun 2025 22:27:05 +0000 Subject: [PATCH] fix(build): update `npm ci` to `npm install` --- .github/workflows/test-e2e.yml | 12 +++++------- .github/workflows/test-unit.yml | 14 +++++++------- Dockerfile | 2 +- docker-compose.test.yml | 4 ++-- docs/TESTING.md | 2 +- run-tests.sh | 2 +- scripts/run-e2e-local.sh | 2 +- 7 files changed, 18 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index 7c3f6b6..09ee7ae 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -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 \ No newline at end of file + fi diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index 83bc119..50a3535 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -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 \ No newline at end of file + run: npm test -- --run diff --git a/Dockerfile b/Dockerfile index c5ec839..769d48f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/docker-compose.test.yml b/docker-compose.test.yml index 22f1eb3..39d0bc9 100644 --- a/docker-compose.test.yml +++ b/docker-compose.test.yml @@ -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: diff --git a/docs/TESTING.md b/docs/TESTING.md index feb1671..e4eb4ff 100644 --- a/docs/TESTING.md +++ b/docs/TESTING.md @@ -545,7 +545,7 @@ jobs: - name: Install Dependencies working-directory: frontend - run: npm ci + run: npm install - name: Run Frontend Tests working-directory: frontend diff --git a/run-tests.sh b/run-tests.sh index dddb557..cb7404f 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -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 diff --git a/scripts/run-e2e-local.sh b/scripts/run-e2e-local.sh index 34b5ab7..fbae2ce 100755 --- a/scripts/run-e2e-local.sh +++ b/scripts/run-e2e-local.sh @@ -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..."