Skip to content

Commit

Permalink
Backport workbench CI fixes from opensearch-project#588 and opensearc…
Browse files Browse the repository at this point in the history
…h-project#704.

Signed-off-by: Yury-Fridlyand <yuryf@bitquilltech.com>
  • Loading branch information
Yury-Fridlyand committed Oct 5, 2022
1 parent 66766c6 commit 01a842d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/sql-workbench-test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,40 +26,41 @@ jobs:
with:
repository: opensearch-project/Opensearch-Dashboards
ref: ${{ env.OPENSEARCH_VERSION }}
path: sql/OpenSearch-Dashboards
path: OpenSearch-Dashboards

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '10.24.1'
node-version-file: "./OpenSearch-Dashboards/.nvmrc"
registry-url: 'https://registry.npmjs.org'

- name: Move Workbench to Plugins Dir
run: |
mv workbench OpenSearch-Dashboards/plugins
mv workbench ../OpenSearch-Dashboards/plugins
- name: OpenSearch Dashboards Plugin Bootstrap
uses: nick-fields/retry@v2
with:
timeout_minutes: 60
max_attempts: 3
command: cd OpenSearch-Dashboards/plugins/workbench; yarn osd bootstrap
command: cd ../OpenSearch-Dashboards/plugins/workbench; yarn osd bootstrap

- name: Test
run: |
cd OpenSearch-Dashboards/plugins/workbench
cd ../OpenSearch-Dashboards/plugins/workbench
yarn test:jest --coverage
- name: Upload coverage
if: always()
uses: codecov/codecov-action@v3
with:
flags: query-workbench
directory: ./OpenSearch-Dashboards/plugins/workbench
directory: ./../OpenSearch-Dashboards/plugins/workbench
token: ${{ secrets.CODECOV_TOKEN }}

- name: Build Artifact
run: |
cd OpenSearch-Dashboards/plugins/workbench
cd ../OpenSearch-Dashboards/plugins/workbench
yarn build
mv ./build/*.zip ./build/${{ env.PLUGIN_NAME }}-${{ env.OPENSEARCH_PLUGIN_VERSION }}.zip
Expand All @@ -68,4 +69,4 @@ jobs:
uses: actions/upload-artifact@v1 # can't update to v3 because upload fails
with:
name: workbench
path: OpenSearch-Dashboards/plugins/workbench/build
path: ../OpenSearch-Dashboards/plugins/workbench/build
4 changes: 0 additions & 4 deletions workbench/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.0.1"
},
"engines": {
"node": "10.24.1",
"yarn": "^1.21.1"
},
"resolutions": {
"**/@types/node": "10.12.27",
"@types/react": "16.3.14",
Expand Down

0 comments on commit 01a842d

Please sign in to comment.