Skip to content

Commit

Permalink
Minimize the cypress steps in ci
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Liang <jiallian@amazon.com>
  • Loading branch information
RyanL1997 committed Dec 7, 2023
1 parent 1135793 commit 0fdbbe6
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions .github/workflows/integration-tests-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
- name: Install Cypress
run: |
cd ./OpenSearch-Dashboards/plugins/dashboards-observability
npx cypress install
npm install cypress --save-dev
shell: bash

- name: Get Cypress version
Expand All @@ -145,26 +145,15 @@ jobs:
cd ./OpenSearch-Dashboards/plugins/dashboards-observability
echo "::set-output name=cypress_version::$(cat ./package.json | jq '.dependencies.cypress' | tr -d '"')"
- name: Cache Cypress
id: cache-cypress
uses: actions/cache@v2
with:
path: ${{ matrix.cypress_cache_folder }}
key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('OpenSearch-Dashboards/plugins/dashboards-observability/package.json') }}

- name: Reset npm's script shell
if: ${{ matrix.os == 'windows-latest' }}
run: |
npm config delete script-shell
- name: Cypress tests
uses: cypress-io/github-action@v2
with:
working-directory: OpenSearch-Dashboards/plugins/dashboards-observability
command: yarn cypress:parallel --browser chrome
wait-on: 'http://localhost:5601'
env:
CYPRESS_CACHE_FOLDER: ${{ matrix.cypress_cache_folder }}
- name: Run Cypress tests
run: |
cd ./OpenSearch-Dashboards/plugins/dashboards-observability
yarn cypress:parallel --browser chrome
- name: Capture failure screenshots
uses: actions/upload-artifact@v1
Expand Down

0 comments on commit 0fdbbe6

Please sign in to comment.