Skip to content

Commit 643c5d3

Browse files
committed
Add cypress ciGroup11 to github workflow for discover 2.0 tests
Signed-off-by: abbyhu2000 <[email protected]>
1 parent e4281e4 commit 643c5d3

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

.github/workflows/cypress_workflow.yml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ env:
3434
FTR_PATH: 'ftr'
3535
START_CMD: 'node ../scripts/opensearch_dashboards --dev --no-base-path --no-watch --savedObjects.maxImportPayloadBytes=10485760 --server.maxPayloadBytes=1759977 --logging.json=false --data.search.aggs.shardDelay.enabled=true --csp.warnLegacyBrowsers=false --uiSettings.overrides["query:enhancements:enabled"]=false'
3636
OPENSEARCH_SNAPSHOT_CMD: 'node ../scripts/opensearch snapshot -E cluster.routing.allocation.disk.threshold_enabled=false'
37+
START_CMD_QUERY_ENHANCED: 'node ../scripts/opensearch_dashboards --dev --no-base-path --no-watch --savedObjects.maxImportPayloadBytes=10485760 --server.maxPayloadBytes=1759977 --logging.json=false --data.search.aggs.shardDelay.enabled=true --csp.warnLegacyBrowsers=false --uiSettings.overrides["query:enhancements:enabled"]=true --uiSettings.overrides['home:useNewHomePage']=true --workspace.enabled=true --data_source.enabled=true'
38+
OPENSEARCH_SNAPSHOT_CMD_QUERY_ENHANCED: 'node ../scripts/opensearch snapshot -E cluster.routing.allocation.disk.threshold_enabled=false --sql'
3739
CYPRESS_BROWSER: 'chromium'
3840
CYPRESS_VISBUILDER_ENABLED: true
3941
CYPRESS_DATASOURCE_MANAGEMENT_ENABLED: false
@@ -49,7 +51,7 @@ jobs:
4951
strategy:
5052
fail-fast: false
5153
matrix:
52-
group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
54+
group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11]
5355
container:
5456
image: docker://opensearchstaging/ci-runner:ci-runner-rockylinux8-opensearch-dashboards-integtest-v2
5557
options: --user 1001
@@ -117,7 +119,7 @@ jobs:
117119
118120
# Setup spec files for existing Functional Test repo cypress tests
119121
- name: Setup spec files
120-
if: ${{ inputs.specs == '' && matrix.group < 10 }}
122+
if: ${{ inputs.specs == '' && matrix.group < 11 }}
121123
working-directory: ${{ env.FTR_PATH }}
122124
shell: bash
123125
run: |
@@ -129,7 +131,7 @@ jobs:
129131
echo "SPEC=${FORMATTED_SPEC}" >> $GITHUB_ENV
130132
131133
- name: Get Cypress version
132-
if: ${{ matrix.group < 10 }}
134+
if: ${{ matrix.group < 11 }}
133135
id: cypress_version
134136
run: |
135137
echo "name=cypress_version::$(cat ./${{ env.FTR_PATH }}/package.json | jq '.devDependencies.cypress' | tr -d '"')" >> $GITHUB_OUTPUT
@@ -148,7 +150,7 @@ jobs:
148150

149151
# Setup spec files for Dashboards in-house cypress tests
150152
- name: Setup spec files for Dashboards tests
151-
if: ${{ inputs.specs == '' && matrix.group > 9 }}
153+
if: ${{ inputs.specs == '' && matrix.group > 10 }}
152154
shell: bash
153155
run: |
154156
IFS="," read -a SPEC_ARRAY <<< $(yarn --silent osd:ciGroup${{ matrix.group }})
@@ -167,15 +169,25 @@ jobs:
167169
start: ${{ env.OPENSEARCH_SNAPSHOT_CMD }}, ${{ env.START_CMD }}
168170
wait-on: 'http://localhost:9200, http://localhost:5601'
169171
command: yarn cypress:run-without-security --browser ${{ env.CYPRESS_BROWSER }} --spec ${{ env.SPEC }}
172+
173+
# Run FT repo tests with query enhancements enabled
174+
- name: Run FT repo tests with query enhancements enabled
175+
if: ${{ matrix.group = 10 }}
176+
uses: cypress-io/github-action@v2
177+
with:
178+
working-directory: ${{ env.FTR_PATH }}
179+
start: ${{ env.OPENSEARCH_SNAPSHOT_CMD_QUERY_ENHANCED }}, ${{ env.START_CMD_QUERY_ENHANCED }}
180+
wait-on: 'http://localhost:9200, http://localhost:5601'
181+
command: yarn cypress:run-without-security --browser ${{ env.CYPRESS_BROWSER }} --spec ${{ env.SPEC }}
170182

171183
# Clear Cypress Cache before running Dashboards tests
172184
- name: Clear Cypress Cache
173-
if: ${{ matrix.group > 9 }}
185+
if: ${{ matrix.group > 10 }}
174186
run: npx cypress cache clear
175187

176188
# Run Dashboards Cypress tests within the source repo
177189
- name: Run Dashboards Cypress tests
178-
if: ${{ matrix.group > 9 }}
190+
if: ${{ matrix.group > 10 }}
179191
uses: cypress-io/github-action@v6
180192
with:
181193
install-command: npx cypress install --force
@@ -186,30 +198,30 @@ jobs:
186198
# Screenshots are only captured on failure, will change this once we do visual regression tests
187199
- name: Upload FT repo screenshots
188200
uses: actions/upload-artifact@v3
189-
if: failure() && (matrix.group < 10)
201+
if: failure() && (matrix.group < 11)
190202
with:
191203
name: ftr-cypress-screenshots
192204
path: ${{ env.FTR_PATH }}/cypress/screenshots
193205
retention-days: 1
194206

195207
- name: Upload FT repo videos
196208
uses: actions/upload-artifact@v3
197-
if: always() && (matrix.group < 10)
209+
if: always() && (matrix.group < 11)
198210
with:
199211
name: ftr-cypress-videos
200212
path: ${{ env.FTR_PATH }}/cypress/videos
201213
retention-days: 1
202214

203215
- name: Upload FT repo results
204216
uses: actions/upload-artifact@v3
205-
if: always() && (matrix.group < 10)
217+
if: always() && (matrix.group < 11)
206218
with:
207219
name: ftr-cypress-results
208220
path: ${{ env.FTR_PATH }}/cypress/results
209221
retention-days: 1
210222

211223
- name: Upload Dashboards screenshots
212-
if: failure() && (matrix.group > 9)
224+
if: failure() && (matrix.group > 10)
213225
uses: actions/upload-artifact@v3
214226
with:
215227
name: dashboards-cypress-screenshots
@@ -218,15 +230,15 @@ jobs:
218230

219231
- name: Upload Dashboards repo videos
220232
uses: actions/upload-artifact@v3
221-
if: always() && (matrix.group > 9)
233+
if: always() && (matrix.group > 10)
222234
with:
223235
name: dashboards-cypress-videos
224236
path: cypress/videos
225237
retention-days: 1
226238

227239
- name: Upload Dashboards repo results
228240
uses: actions/upload-artifact@v3
229-
if: always() && (matrix.group > 9)
241+
if: always() && (matrix.group > 10)
230242
with:
231243
name: dashboards-cypress-results
232244
path: cypress/results

0 commit comments

Comments
 (0)