Skip to content

Commit

Permalink
simplifies workflow, update run command
Browse files Browse the repository at this point in the history
Signed-off-by: Sean Li <lnse@amazon.com>
  • Loading branch information
sejli committed Feb 20, 2025
1 parent 601d367 commit 9467c13
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions .github/workflows/cypress_workflow_with_s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,12 @@ on:
- 'changelogs/fragments/**'
workflow_dispatch:
inputs:
test_repo:
description: 'Cypress test repo'
default: 'opensearch-project/opensearch-dashboards-functional-test'
required: true
type: string
test_branch:
description: 'Cypress test branch (default: source branch)'
required: false
type: string
specs:
description: 'Tests to run (default: osd:ciGroup10)'
description: 'Tests to run'
required: false
type: string
pr_number:
Expand All @@ -29,7 +24,6 @@ on:
type: number

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'
CYPRESS_BROWSER: 'chromium'
Expand All @@ -49,7 +43,7 @@ jobs:
env:
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"]=true --uiSettings.overrides[''home:useNewHomePage'']=true --data_source.enabled=true --workspace.enabled=true --opensearch.ignoreVersionMismatch=true'
OPENSEARCH_SNAPSHOT_CMD: '/bin/bash -c "./opensearch-2.17.0/opensearch-tar-install.sh &"'
name: Run cypress tests (osd:ciGroup10)
name: Run cypress tests with S3
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -71,18 +65,11 @@ jobs:
- name: Build plugins
run: node scripts/build_opensearch_dashboards_platform_plugins --no-examples --workers 12

- name: Checkout FT repo
uses: actions/checkout@v2
with:
path: ${{ env.FTR_PATH }}
repository: ${{ env.TEST_REPO }}
ref: '${{ env.TEST_BRANCH }}'

- name: Setup spec files
if: ${{ inputs.specs == '' }}
shell: bash
run: |
DASHBOARDS_SPEC="$(yarn --silent osd:ciGroup10)"
DASHBOARDS_SPEC="cypress/integration/core_opensearch_dashboards/opensearch_dashboards/apps/query_enhancements/s3_dataset.spec.js"
echo "DASHBOARDS_SPEC=${DASHBOARDS_SPEC}" >> $GITHUB_ENV
echo "DASHBOARDS_SPEC=${DASHBOARDS_SPEC}"
Expand Down Expand Up @@ -127,7 +114,7 @@ jobs:
if: failure()
uses: actions/upload-artifact@v4
with:
name: dashboards-cypress-screenshots-10
name: dashboards-cypress-screenshots-s3
path: cypress/screenshots
retention-days: 1
overwrite: true
Expand All @@ -136,7 +123,7 @@ jobs:
uses: actions/upload-artifact@v4
if: failure()
with:
name: dashboards-cypress-videos-10
name: dashboards-cypress-videos-s3
path: cypress/videos
retention-days: 1
overwrite: true
Expand All @@ -145,7 +132,7 @@ jobs:
uses: actions/upload-artifact@v4
if: always()
with:
name: dashboards-cypress-results-10
name: dashboards-cypress-results-s3
path: cypress/results
retention-days: 1
overwrite: true

0 comments on commit 9467c13

Please sign in to comment.