forked from opensearch-project/OpenSearch-Dashboards
-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (96 loc) · 3.54 KB
/
cypress12_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage
flags: cypress12