Skip to content

coverage

coverage #4

name: Cypress 12 experimental tests
on:
push:
branches: ['**'] # Run the functional test on push for only release branches
paths-ignore:
- '**/*.md'
- 'docs/**'
- '.lycheeignore'
- 'CODEOWNERS'
- 'changelogs/fragments/**'
pull_request:
branches: ['**']
paths-ignore:
- '**/*.md'
- 'docs/**'
- '.lycheeignore'
- 'CODEOWNERS'
- 'changelogs/fragments/**'
env:
CYPRESS_BROWSER: 'chromium'
CYPRESS_VISBUILDER_ENABLED: true
CYPRESS_DATASOURCE_MANAGEMENT_ENABLED: false
OSD_SNAPSHOT_SKIP_VERIFY_CHECKSUM: true
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'
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!'
LATEST_VERSION: '3.0.0'
jobs:
cypress-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
- name: Setup Yarn
run: |
npm uninstall -g yarn
npm i -g [email protected]
yarn config set network-timeout 1000000 -g
- name: Configure Yarn Cache
run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV
- name: Initialize Yarn Cache
uses: actions/cache@v4
with:
path: ${{ env.YARN_CACHE_LOCATION }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
# Lock Chrome version until ChromeDriver's release pipeline is fixed
- name: Download Chrome
id: download-chrome
uses: abhi1693/[email protected]
with:
browser: chrome
# v122
version: 1250586
- name: Setup Chrome (Linux)
run: |
sudo rm -rf /usr/bin/google-chrome /opt/google/chrome
sudo ln -s ${{steps.download-chrome.outputs.path}}/${{steps.download-chrome.outputs.binary}} /usr/bin/google-chrome
- name: Setup chromedriver
run: node scripts/upgrade_chromedriver.js
- name: Run bootstrap (Linux)
run: yarn osd bootstrap
- name: Build plugins
run: node scripts/build_opensearch_dashboards_platform_plugins --no-examples --workers 10
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'corretto'
- name: Run OpenSearch
run: |
npm i osd-launcher -g
osd-launcher -os 3.0.0 --no-security --no-build --no-plugins -p dummy --destination ~/
/bin/bash -c ~/OpenSearch-v3.0.0/bin/opensearch &
/bin/bash -c 'node scripts/opensearch_dashboards --dev --no-base-path --no-watch --opensearch.ignoreVersionMismatch=true --opensearch.ssl.verificationMode=none --savedObjects.maxImportPayloadBytes=10485760 --server.maxPayloadBytes=1759977 --logging.json=false --data.search.aggs.shardDelay.enabled=true --csp.warnLegacyBrowsers=false --uiSettings.overrides["query:enhancements:enabled"]=false' &
- name: Wait for 60 seconds
run: sleep 60s
shell: bash
- name: Run cypress@12 tests
run: yarn test:cypress12
- name: Upload Code Coverage
id: upload-code-coverage
uses: codecov/codecov-action@v5
with:
directory: ./coverage
flags: cypress12