From 01a842dab7b6684662e4b58a76ac632fa315707f Mon Sep 17 00:00:00 2001 From: Yury-Fridlyand Date: Tue, 4 Oct 2022 23:22:50 -0700 Subject: [PATCH] Backport workbench CI fixes from #588 and #704. Signed-off-by: Yury-Fridlyand --- .../sql-workbench-test-and-build-workflow.yml | 17 +++++++++-------- workbench/package.json | 4 ---- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/sql-workbench-test-and-build-workflow.yml b/.github/workflows/sql-workbench-test-and-build-workflow.yml index 995c7aaf6e..d708d04e86 100644 --- a/.github/workflows/sql-workbench-test-and-build-workflow.yml +++ b/.github/workflows/sql-workbench-test-and-build-workflow.yml @@ -26,27 +26,28 @@ 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 @@ -54,12 +55,12 @@ jobs: 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 @@ -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 diff --git a/workbench/package.json b/workbench/package.json index 4082fa9061..8bf4b6ff98 100644 --- a/workbench/package.json +++ b/workbench/package.json @@ -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",