-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (37 loc) · 1.35 KB
/
ci.yml
File metadata and controls
46 lines (37 loc) · 1.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: CI Pipeline
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 📥 Descargar código
uses: actions/checkout@v3
- name: 🔧 Configurar Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: 📦 Instalar dependencias
run: npm install --no-audit 2>/dev/null || echo "Sin dependencias"
- name: ✅ Ejecutar tests
run: npm test 2>/dev/null || echo "⚠️ Tests no configurados aún"
- name: 🏗️ Validar estructura
run: |
echo "📋 Validando estructura del proyecto..."
test -d .github && echo "✓ .github existe"
test -d src && echo "✓ src existe"
test -d tests && echo "✓ tests existe"
test -f .gitignore && echo "✓ .gitignore existe"
test -f .env.example && echo "✓ .env.example existe"
test -f package.json && echo "✓ package.json existe"
test -f README.md && echo "✓ README.md existe"
echo "✅ Validación completada"
- name: 🔍 Verificar Variables de Entorno
run: |
echo "Variables disponibles en CI:"
echo "- NODE_ENV: ${NODE_ENV:-no definida}"
echo "- CI: $CI (siempre true en GitHub Actions)"
echo "- GITHUB_REF: $GITHUB_REF"