1+ name : Cypress test for core Dashboards
2+ on :
3+ pull_request :
4+ branches : ['**']
5+ paths :
6+ - ' .github/workflows/cypress-workflow-bundle-snapshot-based-ci-groups.yml'
7+ - ' cypress/**/core-opensearch-dashboards/**'
8+ - ' cypress/utils/dashboards/**'
9+ push :
10+ branches : ['**']
11+ paths :
12+ - ' .github/workflows/cypress-workflow-bundle-snapshot-based-ci-groups.yml'
13+ - ' cypress/**/core-opensearch-dashboards/**'
14+ - ' cypress/utils/dashboards/**'
15+
16+ env :
17+ CI_GROUPS : " 1,2,3,4,5,6,7,8,9"
18+
19+ jobs :
20+ get_spec :
21+ runs-on : ' ubuntu-latest'
22+ outputs :
23+ MATRIX_INCLUDES : ${{ steps.get_spec.outputs.MATRIX_INCLUDES }}
24+ steps :
25+ - name : Checkout Branch
26+ uses : actions/checkout@v3
27+ - name : Checkout cypress-test
28+ uses : actions/checkout@v2
29+ with :
30+ repository : ${{github.repository}}
31+ path : spec-detect
32+ - id : get_spec
33+ name : Get specs array
34+ run : |
35+ cd spec-detect
36+ result="["
37+ ## split CI_Groups into array
38+ IFS="," read -a groups <<< "${{ env.CI_GROUPS }}"
39+ for group in "${groups[@]}"; do
40+ item="{\"ciGroup\": \"${group}\", \"specs\": "
41+ IFS="," read -a SPEC_ARRAY <<< "$(npm run -s osd:ciGroup${group})"
42+ FORMATTED_SPEC="\""
43+ for i in "${SPEC_ARRAY[@]}"; do
44+ FORMATTED_SPEC+="cypress/integration/core-opensearch-dashboards/opensearch-dashboards/${i},"
45+ done
46+ FORMATTED_SPEC+="\" }"
47+ if [[ "${result}" != "[" ]];
48+ then
49+ result+=","
50+ fi
51+ item+="${FORMATTED_SPEC}"
52+ result+="${item}"
53+ done
54+
55+ result+=']';
56+
57+ echo ${result}
58+ echo "MATRIX_INCLUDES=${result}" >> "$GITHUB_OUTPUT"
59+
60+ tests-with-security :
61+ needs : ["get_spec"]
62+ strategy :
63+ fail-fast : false
64+ matrix :
65+ include : ${{ fromJSON(needs.get_spec.outputs.MATRIX_INCLUDES) }}
66+ name : (security)osd:ciGroup${{ matrix.ciGroup }}
67+ uses : ./.github/workflows/release-e2e-workflow-template.yml
68+ with :
69+ test-name : " osd:ciGroup${{ matrix.ciGroup }}"
70+ test-command : env CYPRESS_NO_COMMAND_LOG=1 CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-with-security --browser chromium --spec '${{ matrix.specs }}'
71+ osd-serve-args : --data_source.enabled=true --data_source.ssl.verificationMode=none --vis_builder.enabled=true --ml_commons_dashboards.enabled=true
72+
73+ tests-without-security :
74+ needs : ["get_spec"]
75+ strategy :
76+ fail-fast : false
77+ matrix :
78+ include : ${{ fromJSON(needs.get_spec.outputs.MATRIX_INCLUDES) }}
79+ name : (non-security)osd:ciGroup${{ matrix.ciGroup }}
80+ uses : ./.github/workflows/release-e2e-workflow-template.yml
81+ with :
82+ test-name : " osd:ciGroup${{ matrix.ciGroup }}"
83+ test-command : env CYPRESS_NO_COMMAND_LOG=1 CYPRESS_ML_COMMONS_DASHBOARDS_ENABLED=true CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-without-security --browser chromium --spec '${{ matrix.specs }}'
84+ osd-serve-args : --data_source.enabled=true --data_source.ssl.verificationMode=none --vis_builder.enabled=true --ml_commons_dashboards.enabled=true
85+ security-enabled : false
86+
87+ # Hold on windows test cases
88+ # https://github.com/opensearch-project/opensearch-dashboards-functional-test/actions/runs/9377445544/job/25819022121?pr=1352
89+ # tests-with-security-windows:
90+ # needs: ["get_spec"]
91+ # strategy:
92+ # fail-fast: false
93+ # matrix:
94+ # include: ${{ fromJSON(needs.get_spec.outputs.MATRIX_INCLUDES) }}
95+ # name: (security)osd:ciGroup${{ matrix.ciGroup }}
96+ # uses: ./.github/workflows/release-e2e-workflow-template-windows.yml
97+ # with:
98+ # test-name: "osd:ciGroup${{ matrix.ciGroup }}"
99+ # test-command: env CYPRESS_NO_COMMAND_LOG=1 CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-with-security --browser chrome --spec '${{ matrix.specs }}'
100+
101+ # tests-without-security-windows:
102+ # needs: ["get_spec"]
103+ # strategy:
104+ # fail-fast: false
105+ # matrix:
106+ # include: ${{ fromJSON(needs.get_spec.outputs.MATRIX_INCLUDES) }}
107+ # name: (non-security)osd:ciGroup${{ matrix.ciGroup }}
108+ # uses: ./.github/workflows/release-e2e-workflow-template-windows.yml
109+ # with:
110+ # test-name: "osd:ciGroup${{ matrix.ciGroup }}"
111+ # test-command: env CYPRESS_NO_COMMAND_LOG=1 CYPRESS_VISBUILDER_ENABLED=true CYPRESS_DATASOURCE_MANAGEMENT_ENABLED=true yarn cypress:run-without-security --browser chrome --spec '${{ matrix.specs }}'
112+ # security-enabled: false
0 commit comments