Skip to content

Commit d4f3dc6

Browse files
committed
fix: update CI/CD workflows to use npm instead of pnpm
1 parent c584775 commit d4f3dc6

File tree

4 files changed

+36
-49
lines changed

4 files changed

+36
-49
lines changed

.github/CI_CD_README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# CI/CD Setup para bect.link
22

3-
Este repositorio implementa un pipeline de CI/CD completo usando GitHub Actions para garantizar la calidad del código antes de hacer merge a la rama master.
3+
Este repositorio implementa un pipeline de CI/CD completo usando GitHub Actio### Si los tests fallan en CI pero pasan localmente:
4+
1. Verificar que las dependencias están sincronizadas (`npm install`)
5+
2. Verificar variables de entorno si las hay
6+
3. Revisar diferencias entre entorno local y CI
7+
4. Si usas pnpm localmente, asegúrate de que el package.json esté actualizadoara garantizar la calidad del código antes de hacer merge a la rama master.
48

59
## 🚀 Configuración Implementada
610

@@ -18,7 +22,7 @@ Este repositorio implementa un pipeline de CI/CD completo usando GitHub Actions
1822
- **coverage**: Genera reporte de cobertura de tests
1923
- **dependency-audit**: Auditoría de seguridad de dependencias
2024

21-
### 2. Scripts de npm/pnpm Actualizados
25+
### 2. Scripts de npm Actualizados
2226

2327
Se agregaron los siguientes scripts al `package.json`:
2428

@@ -54,23 +58,23 @@ Para que un Pull Request pueda ser mergeado a master, debe cumplir:
5458

5559
```bash
5660
# Instalar dependencias
57-
pnpm install
61+
npm install
5862

5963
# Ejecutar tests en modo watch
60-
pnpm run test:watch
64+
npm run test:watch
6165

6266
# Ejecutar todos los checks antes de hacer PR
63-
pnpm run lint:eslint
64-
pnpm run lint:check
65-
pnpm run check
66-
pnpm run test:run
67-
pnpm run build
67+
npm run lint:eslint
68+
npm run lint:check
69+
npm run check
70+
npm run test:run
71+
npm run build
6872

6973
# Ver cobertura de tests
70-
pnpm run test:coverage
74+
npm run test:coverage
7175

7276
# Formatear código
73-
pnpm run lint
77+
npm run lint
7478
```
7579

7680
## 🔧 Configuración de Branch Protection
@@ -108,7 +112,7 @@ pnpm run lint
108112
## 🚨 Troubleshooting
109113

110114
### Si los tests fallan en CI pero pasan localmente:
111-
1. Verificar que las dependencias están sincronizadas (`pnpm install`)
115+
1. Verificar que las dependencias están sincronizadas (`npm install`)
112116
2. Verificar variables de entorno si las hay
113117
3. Revisar diferencias entre entorno local y CI
114118

.github/workflows/ci.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ on:
1818

1919
env:
2020
NODE_VERSION: '20'
21-
PNPM_VERSION: 'latest'
2221

2322
jobs:
2423
test:
@@ -33,27 +32,22 @@ jobs:
3332
uses: actions/setup-node@v4
3433
with:
3534
node-version: ${{ env.NODE_VERSION }}
36-
cache: 'pnpm'
37-
38-
- name: Install pnpm
39-
uses: pnpm/action-setup@v4
40-
with:
41-
version: ${{ env.PNPM_VERSION }}
35+
cache: 'npm'
4236

4337
- name: Install dependencies
44-
run: pnpm install --frozen-lockfile
38+
run: npm install
4539

4640
- name: Run ESLint
47-
run: pnpm run lint:eslint
41+
run: npm run lint:eslint
4842

4943
- name: Check code formatting
50-
run: pnpm run lint:check
44+
run: npm run lint:check
5145

5246
- name: Run tests
53-
run: pnpm run test:run
47+
run: npm run test:run
5448

5549
- name: Build project
56-
run: pnpm run build
50+
run: npm run build
5751

5852
type-check:
5953
name: Type Check
@@ -67,15 +61,10 @@ jobs:
6761
uses: actions/setup-node@v4
6862
with:
6963
node-version: ${{ env.NODE_VERSION }}
70-
cache: 'pnpm'
71-
72-
- name: Install pnpm
73-
uses: pnpm/action-setup@v4
74-
with:
75-
version: ${{ env.PNPM_VERSION }}
64+
cache: 'npm'
7665

7766
- name: Install dependencies
78-
run: pnpm install --frozen-lockfile
67+
run: npm install
7968

8069
- name: Type check
81-
run: pnpm run check
70+
run: npm run check

.github/workflows/code-quality.yml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,13 @@ jobs:
1919
uses: actions/setup-node@v4
2020
with:
2121
node-version: '20'
22-
cache: 'pnpm'
23-
24-
- name: Install pnpm
25-
uses: pnpm/action-setup@v4
26-
with:
27-
version: latest
22+
cache: 'npm'
2823

2924
- name: Install dependencies
30-
run: pnpm install --frozen-lockfile
25+
run: npm install
3126

3227
- name: Run tests with coverage
33-
run: pnpm run test:coverage
28+
run: npm run test:coverage
3429

3530
- name: Upload coverage to Codecov
3631
uses: codecov/codecov-action@v4
@@ -52,18 +47,13 @@ jobs:
5247
uses: actions/setup-node@v4
5348
with:
5449
node-version: '20'
55-
cache: 'pnpm'
56-
57-
- name: Install pnpm
58-
uses: pnpm/action-setup@v4
59-
with:
60-
version: latest
50+
cache: 'npm'
6151

6252
- name: Install dependencies
63-
run: pnpm install --frozen-lockfile
53+
run: npm install
6454

6555
- name: Run security audit
66-
run: pnpm audit
56+
run: npm audit
6757

6858
- name: Check for outdated dependencies
69-
run: pnpm outdated || true
59+
run: npm outdated || true

.npmrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# npm configuration for CI/CD
2+
fund=false
3+
audit-level=moderate
4+
save-exact=true

0 commit comments

Comments
 (0)