This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cypress 12 experimental tests | |
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' | |
COVERAGE: true | |
jobs: | |
cypress-tests: | |
runs-on: ubuntu-latest | |
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 | |
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 | |
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"]=true --data_source.enabled=true --workspace.enabled=false' & | |
- name: Wait for 60 seconds | |
run: sleep 60s | |
shell: bash | |
- name: Run tests | |
run: yarn test:cypress | |
- name: Upload coverage | |
id: upload-code-coverage | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
directory: ./coverage | |
flags: cypress12 | |
- name: Upload test artifacts | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cypress-artifacts | |
path: | | |
cypress/screenshots | |
cypress/videos | |
coverage | |
retention-days: 1 |