8
8
branches :
9
9
- main
10
10
- dev-*
11
- env :
12
- VERSION : ' 1.3.0'
13
11
jobs :
14
12
tests :
15
13
name : Run Cypress E2E tests
@@ -24,16 +22,25 @@ jobs:
24
22
uses : actions/setup-java@v1
25
23
with :
26
24
java-version : 14
25
+ - name : Checkout monetery-test
26
+ uses : actions/checkout@v2
27
+ with :
28
+ repository : ${{github.repository}}
29
+ path : monetery-test
30
+ - name : Get package version
31
+ working-directory : monetery-test
32
+ run : |
33
+ echo "VERSION=$(yarn --silent pkg-version)" >> $GITHUB_ENV
27
34
- name : Get and run OpenSearch
28
35
run : |
29
- wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ env.VERSION }}/latest/linux/x64/dist/opensearch/opensearch-${{ env.VERSION }}-linux-x64.tar.gz
36
+ wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ env.VERSION }}/latest/linux/x64/tar/ dist/opensearch/opensearch-${{ env.VERSION }}-linux-x64.tar.gz
30
37
tar -xzf opensearch-${{ env.VERSION }}-linux-x64.tar.gz
31
38
cd opensearch-${{ env.VERSION }}/
32
39
./opensearch-tar-install.sh &
33
40
timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:admin -k https://localhost:9200)" != "200" ]]; do sleep 5; done'
34
41
- name : Get OpenSearch-Dashboards
35
42
run : |
36
- wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz
43
+ wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/ dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz
37
44
tar -xzf opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz
38
45
- name : Get node and yarn versions
39
46
id : versions
@@ -49,15 +56,10 @@ jobs:
49
56
cd opensearch-dashboards-${{ env.VERSION }}
50
57
bin/opensearch-dashboards serve &
51
58
timeout 300 bash -c 'while [[ "$(curl -s localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
52
- - name : Checkout monterey-test
53
- uses : actions/checkout@v2
54
- with :
55
- repository : ${{github.repository}}
56
- path : monterey-test
57
59
- name : Get Cypress version
58
60
id : cypress_version
59
61
run : |
60
- echo "::set-output name=cypress_version::$(cat ./monterey -test/package.json | jq '.devDependencies.cypress' | tr -d '"')"
62
+ echo "::set-output name=cypress_version::$(cat ./monetery -test/package.json | jq '.devDependencies.cypress' | tr -d '"')"
61
63
- name : Cache Cypress
62
64
id : cache-cypress
63
65
uses : actions/cache@v1
@@ -71,18 +73,18 @@ jobs:
71
73
- name : Cypress tests
72
74
uses : cypress-io/github-action@v2
73
75
with :
74
- working-directory : monterey -test
76
+ working-directory : monetery -test
75
77
command : yarn cypress:run-with-security --browser chromium --spec 'cypress/integration/core-opensearch-dashboards/opensearch-dashboards/*.js'
76
78
wait-on : ' http://localhost:5601'
77
79
# Screenshots are only captured on failure, will change this once we do visual regression tests
78
80
- uses : actions/upload-artifact@v1
79
81
if : failure()
80
82
with :
81
83
name : cypress-screenshots
82
- path : monterey -test/cypress/screenshots
84
+ path : monetery -test/cypress/screenshots
83
85
# Test run video was always captured, so this action uses "always()" condition
84
86
- uses : actions/upload-artifact@v1
85
87
if : always()
86
88
with :
87
89
name : cypress-videos
88
- path : monterey -test/cypress/videos
90
+ path : monetery -test/cypress/videos
0 commit comments