Skip to content

Commit

Permalink
Add build to workflow; update docker image
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Ohlsen <[email protected]>
  • Loading branch information
ohltyler committed Oct 10, 2023
1 parent de6e677 commit ff6adc5
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Unit tests workflow
name: Build and test workflow
on:
push:
branches:
Expand All @@ -9,12 +9,34 @@ on:
env:
OPENSEARCH_DASHBOARDS_VERSION: 'main'
jobs:
tests:
name: Run unit tests
Get-CI-Image-Tag:
runs-on: ubuntu-latest
outputs:
ci-image-version-linux: ${{ steps.step-ci-image-version-linux.outputs.ci-image-version-linux }}
steps:
- name: Install crane
uses: iarekylew00t/crane-installer@v1
with:
crane-release: v0.15.2
- name: Checkout opensearch-build repository
uses: actions/checkout@v2
with:
repository: "opensearch-project/opensearch-build"
ref: "main"
path: "opensearch-build"
- name: Get ci image version from opensearch-build repository scripts
id: step-ci-image-version-linux
run: |
crane version
CI_IMAGE_VERSION=`opensearch-build/docker/ci/get-ci-images.sh -p rockylinux8 -u opensearch-dashboards -t build | head -1` echo $CI_IMAGE_VERSION
echo "ci-image-version-linux=$CI_IMAGE_VERSION" >> $GITHUB_OUTPUT
build-and-test:
name: Build the plugin and run unit tests
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
needs: Get-CI-Image-Tag
steps:
# Enable longer filenames for windows
- name: Enable longer filenames
Expand Down Expand Up @@ -48,7 +70,10 @@ jobs:
run: |
cd OpenSearch-Dashboards/plugins/anomaly-detection-dashboards-plugin
yarn osd bootstrap
- name: Run tests
- name: Build the plugin
cd OpenSearch-Dashboards/plugins/anomaly-detection-dashboards-plugin
yarn build
- name: Run unit tests
run: |
cd OpenSearch-Dashboards/plugins/anomaly-detection-dashboards-plugin
yarn run test:jest --coverage
Expand Down
24 changes: 23 additions & 1 deletion .github/workflows/remote-integ-tests-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,28 @@ on:
branches:
- "*"
jobs:
test-without-security:
Get-CI-Image-Tag:
runs-on: ubuntu-latest
outputs:
ci-image-version-linux: ${{ steps.step-ci-image-version-linux.outputs.ci-image-version-linux }}
steps:
- name: Install crane
uses: iarekylew00t/crane-installer@v1
with:
crane-release: v0.15.2
- name: Checkout opensearch-build repository
uses: actions/checkout@v2
with:
repository: "opensearch-project/opensearch-build"
ref: "main"
path: "opensearch-build"
- name: Get ci image version from opensearch-build repository scripts
id: step-ci-image-version-linux
run: |
crane version
CI_IMAGE_VERSION=`opensearch-build/docker/ci/get-ci-images.sh -p rockylinux8 -u opensearch-dashboards -t build | head -1` echo $CI_IMAGE_VERSION
echo "ci-image-version-linux=$CI_IMAGE_VERSION" >> $GITHUB_OUTPUT
integ-test-without-security:
name: Run integ tests without security
strategy:
matrix:
Expand All @@ -22,6 +43,7 @@ jobs:
- os: ubuntu-latest
cypress_cache_folder: ~/.cache/Cypress
runs-on: ${{ matrix.os }}
needs: Get-CI-Image-Tag
steps:
- name: Set up Java 11
uses: actions/setup-java@v3
Expand Down

0 comments on commit ff6adc5

Please sign in to comment.