Skip to content

Commit 373a528

Browse files
authored
updated integ tests workflow (#437)
Signed-off-by: saimedhi <saimedhi@amazon.com>
1 parent c037914 commit 373a528

File tree

1 file changed

+34
-24
lines changed

1 file changed

+34
-24
lines changed

.github/workflows/remote-integ-tests-workflow.yml

+34-24
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
os: [ ubuntu-latest ]
17-
jdk: [ 21 ]
17+
jdk: [ 11 ]
1818
runs-on: ${{ matrix.os }}
1919

2020
steps:
@@ -28,20 +28,20 @@ jobs:
2828
with:
2929
path: flow-framework
3030
repository: opensearch-project/flow-framework
31-
ref: '${{ github.base_ref }}'
31+
ref: ${{ env.OPENSEARCH_DASHBOARDS_VERSION }}
3232

3333
- name: Run OpenSearch with plugin
3434
run: |
3535
cd flow-framework
3636
./gradlew run &
3737
timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9200)" != "200" ]]; do sleep 5; done'
3838
shell: bash
39-
39+
4040
- name: Check OpenSearch Running on Linux
4141
if: ${{ runner.os != 'Windows'}}
4242
run: curl http://localhost:9200/
4343
shell: bash
44-
44+
4545
- name: Checkout OpenSearch Dashboards
4646
uses: actions/checkout@v2
4747
with:
@@ -70,44 +70,55 @@ jobs:
7070
node-version: ${{ steps.tool-versions.outputs.node_version }}
7171
registry-url: 'https://registry.npmjs.org'
7272

73-
- name: Setup Opensearch Dashboards
73+
- name: Install correct yarn version for OpenSearch Dashboards
74+
id: setup-yarn
7475
run: |
7576
npm uninstall -g yarn
76-
echo "Installing yarn ${{ steps.tool-versions.outputs.yarn_version }}"
77-
npm i -g yarn@${{ steps.tool-versions.outputs.yarn_version }}
78-
yarn cache clean
79-
yarn add sha.js
80-
working-directory: OpenSearch-Dashboards
81-
shell: bash
77+
echo "Installing yarn ${{ steps.versions_step.outputs.yarn_version }}"
78+
npm i -g yarn@${{ steps.versions_step.outputs.yarn_version }}
8279
83-
- name: Bootstrap Opensearch Dashboards
80+
- name: Yarn Cache
81+
uses: actions/cache@v4
82+
with:
83+
path: |
84+
OpenSearch-Dashboards/**/target
85+
OpenSearch-Dashboards/**/node_modules
86+
key: ${{ runner.OS }}-build-${{ hashFiles('OpenSearch-Dashboards/**/yarn.lock') }}
87+
restore-keys: |
88+
${{ runner.OS }}-build-
89+
90+
- name: Bootstrap OpenSearch Dashboards
8491
run: |
92+
cd OpenSearch-Dashboards
8593
yarn osd bootstrap --single-version=loose
86-
working-directory: OpenSearch-Dashboards/plugins/dashboards-flow-framework
8794
95+
- name: Compile OpenSearch Dashboards
96+
run: |
97+
cd OpenSearch-Dashboards
98+
node scripts/build_opensearch_dashboards_platform_plugins --no-examples --workers=10 --verbose
99+
88100
- name: Run Opensearch Dashboards with FF Installed
89101
run: |
90102
nohup yarn start --no-base-path --no-watch --server.host="0.0.0.0" | tee dashboard.log &
91-
sleep 60
92103
working-directory: OpenSearch-Dashboards
93104

94-
- name : Check If OpenSearch Dashboards Is Ready
105+
- name: Check If OpenSearch Dashboards Is Ready
95106
if: ${{ runner.os == 'Linux' }}
96107
run: |
97-
if timeout 600 grep -q "bundles compiled successfully after" <(tail -n0 -f dashboard.log); then
98-
echo "OpenSearch Dashboards compiled successfully."
108+
cd ./OpenSearch-Dashboards
109+
if timeout 60 grep -q "http server running" <(tail -n +1 -f dashboard.log); then
110+
echo "OpenSearch Dashboards started successfully."
99111
else
100-
echo "Timeout for 600 seconds reached. OpenSearch Dashboards did not finish compiling."
112+
echo "Timeout of 60 seconds reached. OpenSearch Dashboards did not start successfully."
101113
exit 1
102-
fi
103-
working-directory: OpenSearch-Dashboards
114+
fi&
104115
105116
- name: Show OpenSearch Dashboards Logs
106117
if: always()
107118
run: cat dashboard.log
108119
working-directory: OpenSearch-Dashboards
109-
110-
- name: Health check
120+
121+
- name: Health check
111122
run: |
112123
timeout 600 bash -c 'while [[ "$(curl -k http://localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
113124
shell: bash
@@ -164,5 +175,4 @@ jobs:
164175
if: failure()
165176
with:
166177
name: cypress-videos-${{ matrix.os }}
167-
path: opensearch-dashboards-functional-test/cypress/videos
168-
178+
path: opensearch-dashboards-functional-test/cypress/videos

0 commit comments

Comments
 (0)