Skip to content

Commit 0c52045

Browse files
committed
Add parallel containers
1 parent 1fa6b22 commit 0c52045

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

.github/workflows/sonarqube.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,19 @@ jobs:
1111
build:
1212
name: Scan
1313
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+
1419
steps:
1520
########################################
1621
# Checkout and Build vue-form-elements
1722
########################################
1823
- uses: actions/checkout@v2
1924
with:
2025
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
26+
2127
- name: Setup node env 🏗
2228
uses: actions/setup-node@master
2329
with:
@@ -60,14 +66,15 @@ jobs:
6066
ref: ${{ env.SCREEN_BUILDER_BRANCH }}
6167

6268
- name: Link vue-form-elements
69+
working-directory: screen-builder
6370
run: npm link @processmaker/vue-form-elements
6471

6572
- name: Install screen-builder dependencies
6673
working-directory: screen-builder
6774
run: npm ci && npm run build-bundle
6875

6976
########################################
70-
# Checkout and Build screen-builder
77+
# Run Cypress tests in parallel
7178
########################################
7279
- name: Cypress run
7380
uses: cypress-io/github-action@v6
@@ -80,34 +87,27 @@ jobs:
8087
config-file: cypress.config.js
8188
spec: "tests/e2e/**/*"
8289
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
8592
env:
86-
# For recording and parallelization to work you must set your CYPRESS_RECORD_KEY
87-
# in GitHub repo → Settings → Secrets → Actions
8893
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
9094
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
9195
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+
9498
- name: Upload Cypress Screenshots
9599
uses: actions/upload-artifact@v4
96-
# Only capture images on failure
97100
if: failure()
98101
with:
99102
name: cypress-screenshots
100103
path: screen-builder/tests/e2e/screenshots
101104

102105
- name: Upload Cypress Videos
103106
uses: actions/upload-artifact@v4
104-
# Only capture videos on failure
105107
if: failure()
106108
with:
107109
name: cypress-videos
108110
path: screen-builder/tests/e2e/videos
109-
- run: ls -l .
110-
- run: ls -R coverage .nyc_output
111111

112112
- name: Prepare coverage
113113
working-directory: screen-builder
@@ -121,6 +121,7 @@ jobs:
121121
- name: Create coverage report
122122
working-directory: screen-builder
123123
run: npx nyc report --reporter html --reporter text --reporter json-summary --reporter lcov --report-dir coverage
124+
124125
- name: Store Artifacts
125126
uses: actions/upload-artifact@v4
126127
with:

0 commit comments

Comments
 (0)