Skip to content

Commit

Permalink
use release build
Browse files Browse the repository at this point in the history
Signed-off-by: Kawika Avilla <[email protected]>
  • Loading branch information
kavilla committed Feb 19, 2024
1 parent 55443f7 commit 50a8938
Showing 1 changed file with 28 additions and 8 deletions.
36 changes: 28 additions & 8 deletions .github/workflows/cypress_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,24 @@ on:
description: 'PR Number (optional)'
required: false
type: number
OS_URL:
description: 'OpenSearch release artifact'
required: false
type: string
OSD_URL:
description: 'OpenSearch Dashboards release artifact'
required: false
type: string

env:
TEST_REPO: ${{ inputs.test_repo != '' && inputs.test_repo || 'opensearch-project/opensearch-dashboards-functional-test' }}
TEST_BRANCH: "${{ inputs.test_branch != '' && inputs.test_branch || github.base_ref }}"
FTR_PATH: 'ftr'
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'
OPENSEARCH_SNAPSHOT_CMD: 'node ../scripts/opensearch snapshot -E cluster.routing.allocation.disk.threshold_enabled=false'
RELEASE_PATH: 'release'
# 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'
# OPENSEARCH_SNAPSHOT_CMD: 'node ../scripts/opensearch snapshot -E cluster.routing.allocation.disk.threshold_enabled=false'
START_CMD: './${{ env.RELEASE_PATH }}/opensearch-dashboards/bin/opensearch-dashboards --savedObjects.maxImportPayloadBytes=10485760 --server.maxPayloadBytes=1759977 --logging.json=false --data.search.aggs.shardDelay.enabled=true'
OPENSEARCH_SNAPSHOT_CMD: './${{ env.RELEASE_PATH }}/opensearch/opensearch-tar-install.sh -E cluster.routing.allocation.disk.threshold_enabled=false'
CYPRESS_BROWSER: 'chromium'
CYPRESS_VISBUILDER_ENABLED: true
CYPRESS_DATASOURCE_MANAGEMENT_ENABLED: false
Expand All @@ -40,6 +51,7 @@ env:
COMMENT_TAG: '[MANUAL CYPRESS TEST RUN RESULTS]'
COMMENT_SUCCESS_MSG: ':white_check_mark: Cypress test run succeeded!'
COMMENT_FAILURE_MSG: ':x: Cypress test run failed!'
OPENSEARCH_INITIAL_ADMIN_PASSWORD: 'myStrongPassword123!'

jobs:
cypress-tests:
Expand Down Expand Up @@ -95,11 +107,19 @@ jobs:
npm uninstall -g yarn
npm i -g [email protected]
- name: Run bootstrap
run: yarn osd bootstrap
# - name: Run bootstrap
# run: yarn osd bootstrap

# - name: Build plugins
# run: node scripts/build_opensearch_dashboards_platform_plugins --no-examples --workers 12

- name: Build plugins
run: node scripts/build_opensearch_dashboards_platform_plugins --no-examples --workers 12
- name: Get OpenSearch Dashboards release
run: |
mkdir -p ${{ env.RELEASE_PATH }}
curl -L ${{ inputs.OSD_URL }} -o ${{ env.RELEASE_PATH }}/opensearch-dashboards.tar.gz
tar -xzf ${{ env.RELEASE_PATH }}/opensearch-dashboards.tar.gz -C ${{ env.RELEASE_PATH }}
curl -L ${{ inputs.OS_URL }} -o ${{ env.RELEASE_PATH }}/opensearch.tar.gz
tar -xzf ${{ env.RELEASE_PATH }}/opensearch.tar.gz -C ${{ env.RELEASE_PATH }}
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -146,8 +166,8 @@ jobs:
with:
working-directory: ${{ env.FTR_PATH }}
start: ${{ env.OPENSEARCH_SNAPSHOT_CMD }}, ${{ env.START_CMD }}
wait-on: 'http://localhost:9200, http://localhost:5601'
command: yarn cypress:run-without-security --browser ${{ env.CYPRESS_BROWSER }} --spec ${{ env.SPEC }}
wait-on: 'https://localhost:9200 -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} -k, http://localhost:5601'
command: yarn cypress:run-with-security --browser ${{ env.CYPRESS_BROWSER }} --spec ${{ env.SPEC }}

# Screenshots are only captured on failure, will change this once we do visual regression tests
- uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 50a8938

Please sign in to comment.