mirror of
https://github.com/readur/readur.git
synced 2025-12-21 06:10:45 -06:00
fix(build): update npm ci to npm install
This commit is contained in:
12
.github/workflows/test-e2e.yml
vendored
12
.github/workflows/test-e2e.yml
vendored
@@ -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
|
||||
|
||||
14
.github/workflows/test-unit.yml
vendored
14
.github/workflows/test-unit.yml
vendored
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -545,7 +545,7 @@ jobs:
|
||||
|
||||
- name: Install Dependencies
|
||||
working-directory: frontend
|
||||
run: npm ci
|
||||
run: npm install
|
||||
|
||||
- name: Run Frontend Tests
|
||||
working-directory: frontend
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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..."
|
||||
|
||||
Reference in New Issue
Block a user