@@ -11,13 +11,19 @@ jobs:
11
11
build :
12
12
name : Scan
13
13
runs-on : ubuntu-latest
14
+ strategy :
15
+ fail-fast : false
16
+ matrix :
17
+ containers : [0, 1, 2, 3, 4] # Distribuirá la carga entre 5 contenedores para paralelismo
18
+
14
19
steps :
15
20
# #######################################
16
21
# Checkout and Build vue-form-elements
17
22
# #######################################
18
23
- uses : actions/checkout@v2
19
24
with :
20
25
fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
26
+
21
27
- name : Setup node env 🏗
22
28
uses : actions/setup-node@master
23
29
with :
@@ -60,14 +66,15 @@ jobs:
60
66
ref : ${{ env.SCREEN_BUILDER_BRANCH }}
61
67
62
68
- name : Link vue-form-elements
69
+ working-directory : screen-builder
63
70
run : npm link @processmaker/vue-form-elements
64
71
65
72
- name : Install screen-builder dependencies
66
73
working-directory : screen-builder
67
74
run : npm ci && npm run build-bundle
68
75
69
76
# #######################################
70
- # Checkout and Build screen-builder
77
+ # Run Cypress tests in parallel
71
78
# #######################################
72
79
- name : Cypress run
73
80
uses : cypress-io/github-action@v6
@@ -80,34 +87,27 @@ jobs:
80
87
config-file : cypress.config.js
81
88
spec : " tests/e2e/**/*"
82
89
record : true
83
- parallel : true
84
- group : ' CI - Chrome'
90
+ parallel : true # Habilita el paralelismo
91
+ group : " CI - Chrome - Container ${{ matrix.containers }} " # Identificar grupo de pruebas por contenedor
85
92
env :
86
- # For recording and parallelization to work you must set your CYPRESS_RECORD_KEY
87
- # in GitHub repo → Settings → Secrets → Actions
88
93
CYPRESS_RECORD_KEY : ${{ secrets.CYPRESS_RECORD_KEY }}
89
- # Creating a token https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
90
94
GITHUB_TOKEN : ${{ secrets.GIT_TOKEN }}
91
95
COMMIT_INFO_MESSAGE : ${{ github.event.pull_request.title }}
92
- # re-enable PR comment bot
93
- COMMIT_INFO_SHA : ${{github.event.pull_request.head.sha}}
96
+ COMMIT_INFO_SHA : ${{ github.event.pull_request.head.sha }}
97
+
94
98
- name : Upload Cypress Screenshots
95
99
uses : actions/upload-artifact@v4
96
- # Only capture images on failure
97
100
if : failure()
98
101
with :
99
102
name : cypress-screenshots
100
103
path : screen-builder/tests/e2e/screenshots
101
104
102
105
- name : Upload Cypress Videos
103
106
uses : actions/upload-artifact@v4
104
- # Only capture videos on failure
105
107
if : failure()
106
108
with :
107
109
name : cypress-videos
108
110
path : screen-builder/tests/e2e/videos
109
- - run : ls -l .
110
- - run : ls -R coverage .nyc_output
111
111
112
112
- name : Prepare coverage
113
113
working-directory : screen-builder
@@ -121,6 +121,7 @@ jobs:
121
121
- name : Create coverage report
122
122
working-directory : screen-builder
123
123
run : npx nyc report --reporter html --reporter text --reporter json-summary --reporter lcov --report-dir coverage
124
+
124
125
- name : Store Artifacts
125
126
uses : actions/upload-artifact@v4
126
127
with :
0 commit comments