Skip to content

Commit

Permalink
Merge pull request #8 from ohltyler/docker-ci
Browse files Browse the repository at this point in the history
Add build to workflow; update docker image
  • Loading branch information
ohltyler authored Oct 10, 2023
2 parents de6e677 + ff6adc5 commit 4ec4f9f
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 4ec4f9f

Please sign in to comment.