99 workflow_dispatch :
1010 inputs :
1111 test_repo :
12- description : ' Test repo'
12+ description : ' Cypress test repo'
1313 default : ' opensearch-project/opensearch-dashboards-functional-test'
1414 required : true
1515 type : string
1616 test_branch :
17- description : ' Test branch (default: source branch)'
17+ description : ' Cypress test branch (default: source branch)'
1818 required : false
1919 type : string
20- pr_number :
21- description : ' PR Number'
22- required : false
23- type : number
2420 specs :
25- description : ' Tests to run (default: core)'
26- default : ' cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js,'
21+ description : ' Tests to run (default: osd:ciGroup)'
2722 required : false
2823 type : string
24+ pr_number :
25+ description : ' PR Number (optional)'
26+ required : false
27+ type : number
2928
3029env :
3130 TEST_REPO : ${{ inputs.test_repo != '' && inputs.test_repo || 'opensearch-project/opensearch-dashboards-functional-test' }}
3231 TEST_BRANCH : " ${{ inputs.test_branch != '' && inputs.test_branch || github.base_ref }}"
3332 FTR_PATH : ' ftr'
34- START_CMD : ' node ../scripts/opensearch_dashboards --dev --no-base-path --no-watch'
33+ 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 '
3534 OPENSEARCH_SNAPSHOT_CMD : ' node ../scripts/opensearch snapshot -E cluster.routing.allocation.disk.threshold_enabled=false'
36- SPEC : ${{ inputs.specs != '' && inputs.specs || 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/**/*.js,' }}
3735 CYPRESS_BROWSER : ' chromium'
3836 CYPRESS_VISBUILDER_ENABLED : true
3937 CYPRESS_DATASOURCE_MANAGEMENT_ENABLED : false
4644jobs :
4745 cypress-tests :
4846 runs-on : ubuntu-latest
47+ strategy :
48+ fail-fast : false
49+ matrix :
50+ group : [1, 2, 3, 4, 5, 6, 7, 8, 9]
4951 container :
5052 image : docker://opensearchstaging/ci-runner:ci-runner-rockylinux8-opensearch-dashboards-integtest-v2
5153 options : --user 1001
5456 CI : 1
5557 # avoid warnings like "tput: No value for $TERM and no -T specified"
5658 TERM : xterm
57- name : Run cypress tests
59+ name : Run cypress tests (osd:ciGroup${{ matrix.group }})
5860 steps :
5961 - name : Get source information from PR number
6062 if : ${{ github.event_name == 'workflow_dispatch' && inputs.pr_number != '' }}
9799 run : yarn osd bootstrap
98100
99101 - name : Build plugins
100- run : node scripts/build_opensearch_dashboards_platform_plugins --no-examples --workers 10
102+ run : node scripts/build_opensearch_dashboards_platform_plugins --no-examples --workers 12
101103
102104 - name : Checkout
103105 uses : actions/checkout@v2
@@ -106,6 +108,23 @@ jobs:
106108 repository : ${{ env.TEST_REPO }}
107109 ref : ' ${{ env.TEST_BRANCH }}'
108110
111+ - name : Setup spec files by input
112+ if : ${{ inputs.specs != '' }}
113+ run : |
114+ echo "SPEC=${{ inputs.specs }}" >> $GITHUB_ENV
115+
116+ - name : Setup spec files
117+ if : ${{ inputs.specs == '' }}
118+ working-directory : ${{ env.FTR_PATH }}
119+ shell : bash
120+ run : |
121+ IFS="," read -a SPEC_ARRAY <<< $(yarn --silent osd:ciGroup${{ matrix.group }})
122+ FORMATTED_SPEC=''
123+ for i in "${SPEC_ARRAY[@]}"; do
124+ FORMATTED_SPEC+="cypress/integration/core-opensearch-dashboards/opensearch-dashboards/${i},"
125+ done
126+ echo "SPEC=${FORMATTED_SPEC}" >> $GITHUB_ENV
127+
109128 - name : Get Cypress version
110129 id : cypress_version
111130 run : |
@@ -179,8 +198,6 @@ jobs:
179198
180199 #### Inputs:
181200 ```
182- Source repo: '${{ env.SOURCE_REPO }}'
183- Source branch: '${{ env.SOURCE_BRANCH }}'
184201 Test repo: '${{ env.TEST_REPO }}'
185202 Test branch: '${{ env.TEST_BRANCH }}'
186203
0 commit comments