-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (38 loc) · 1.1 KB
/
jest.yaml
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
name: Jest CI
on:
push:
branches:
- master # Despliegue en producción
- julio # Ramas de desarrollo
- irving # Ramas de desarrollo
- jesus # Ramas de desarrollo
- feature/*
pull_request:
branches:
- master
- julio
- irving
- jesus
workflow_dispatch: # Activación manual opcional
jobs:
jest:
runs-on: ubuntu-latest
strategy:
matrix:
test_file:
- 'barra.test.js'
- 'inicio.test.js'
- 'login.test.js'
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install dependencies
run: |
npm install --legacy-peer-deps
npm install --save-dev @testing-library/jest-dom --legacy-peer-deps # Instala jest-dom para pruebas
- name: Run Jest tests
run: npx jest --ci --coverage --env=jsdom --testPathPattern='${{ matrix.test_file }}'