Skip to content

Commit

Permalink
Merge pull request opensearch-project#888 from Bit-Quill/dev-fix-ci-1.x
Browse files Browse the repository at this point in the history
Fix CI workflows on `1.x`
  • Loading branch information
Yury-Fridlyand authored Oct 6, 2022
2 parents e2d64f8 + 75c3da1 commit 4914f64
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/sql-test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ jobs:
- uses: actions/checkout@v3

- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
uses: actions/setup-java@v1
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}

- name: Build with Gradle
Expand Down
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 4914f64

Please sign in to comment.