Skip to content

Commit b4c30c8

Browse files
authored
Use version from package.json for integration tests (opensearch-project#1465)
Signed-off-by: Craig Perkins <cwperx@amazon.com>
1 parent 1f0a3b9 commit b4c30c8

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

.github/workflows/cypress-test.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ env:
99
START_CMD: 'node ../scripts/opensearch_dashboards --dev --no-base-path --no-watch --opensearch_security.multitenancy.enable_aggregation_view=true'
1010
OPENSEARCH_SNAPSHOT_CMD: 'node ../scripts/opensearch snapshot'
1111
SPEC: 'cypress/integration/plugins/security-dashboards-plugin/aggregation_view.js,'
12-
OPENSEARCH_VERSION: 2.8.0
1312
PLUGIN_NAME: opensearch-security
14-
PLUGIN_VERSION: 2.8.0.0
1513

1614
jobs:
1715
tests:
@@ -31,6 +29,14 @@ jobs:
3129
- name: Checkout Branch
3230
uses: actions/checkout@v3
3331

32+
- name: Set env
33+
run: |
34+
opensearch_version=$(node -p "require('./package.json').opensearchDashboards.version")
35+
plugin_version=$(node -p "require('./package.json').version")
36+
echo "OPENSEARCH_VERSION=$opensearch_version" >> $GITHUB_ENV
37+
echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV
38+
shell: bash
39+
3440
- name: Download security plugin and create setup scripts
3541
uses: ./.github/actions/download-plugin
3642
with:

.github/workflows/integration-test.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ on: [push, pull_request]
55
env:
66
TEST_BROWSER_HEADLESS: 1
77
CI: 1
8-
OPENSEARCH_VERSION: 2.8.0
98
PLUGIN_NAME: opensearch-security
10-
PLUGIN_VERSION: 2.8.0.0
119

1210
jobs:
1311
tests:
@@ -27,6 +25,14 @@ jobs:
2725
with:
2826
java-version: 11
2927

28+
- name: Set env
29+
run: |
30+
opensearch_version=$(node -p "require('./package.json').opensearchDashboards.version")
31+
plugin_version=$(node -p "require('./package.json').version")
32+
echo "OPENSEARCH_VERSION=$opensearch_version" >> $GITHUB_ENV
33+
echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV
34+
shell: bash
35+
3036
- uses: browser-actions/setup-geckodriver@v0.0.0
3137
- run: geckodriver --version
3238

0 commit comments

Comments
 (0)