Skip to content

Commit

Permalink
Add cigroup matrix for parallel runs
Browse files Browse the repository at this point in the history
Signed-off-by: Manasvini B Suryanarayana <[email protected]>
  • Loading branch information
manasvinibs committed Feb 23, 2024
1 parent eff7cb5 commit eefc531
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/dashboards_cypress_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ env:
jobs:
cypress-tests:
runs-on: ubuntu-latest
strategy:
matrix:
spec_group:
[1, 2, 3, 4] # Add more spec files as needed
container:
image: docker://opensearchstaging/ci-runner:ci-runner-rockylinux8-opensearch-dashboards-integtest-v2
options: --user 1001
Expand All @@ -61,7 +65,7 @@ jobs:
CI: 1
# avoid warnings like "tput: No value for $TERM and no -T specified"
TERM: xterm
name: Run cypress tests ${{ inputs.UNIQUE_ID}}
name: Run cypress tests (osd:ciGroup${{ matrix.spec_group }}) ${{ inputs.UNIQUE_ID}}
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -82,6 +86,19 @@ jobs:
npm i -g [email protected]
yarn config set network-timeout 1000000 -g
- name: Setup spec files
if: ${{ inputs.specs == '' }}
working-directory: ${{ env.OSD_PATH }}
shell: bash
run: |
IFS="," read -a SPEC_ARRAY <<< $(yarn --silent osd:ciGroup${{ matrix.spec_group }})
FORMATTED_SPEC=''
for i in "${SPEC_ARRAY[@]}"; do
FORMATTED_SPEC+="cypress/integration/core-opensearch-dashboards/${i},"
done
echo "SPEC=${FORMATTED_SPEC}" >> $GITHUB_ENV
echo "SPec found: $SPEC"
- name: Get Cypress version
id: cypress_version
run: |
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,11 @@
"spec_to_console": "scripts/use_node scripts/spec_to_console",
"pkg-version": "scripts/use_node -e \"console.log(require('./package.json').version)\"",
"cypress:run-without-security": "env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=false",
"cypress:run-with-security": "env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=true,openSearchUrl=https://localhost:9200,WAIT_FOR_LOADER_BUFFER_MS=500"

"cypress:run-with-security": "env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=true,openSearchUrl=https://localhost:9200,WAIT_FOR_LOADER_BUFFER_MS=500",
"osd:ciGroup1": "echo \"\"",
"osd:ciGroup2": "echo \"\"",
"osd:ciGroup3": "echo \"\"",
"osd:ciGroup4": "echo \"dashboard_sanity_test_spec.js\""
},
"repository": {
"type": "git",
Expand Down

0 comments on commit eefc531

Please sign in to comment.