Skip to content

Commit

Permalink
feat: enable windows and macos builds (#1108)
Browse files Browse the repository at this point in the history
* fix: initial code to add windows support for opensearch-observability

Signed-off-by: Derek Ho <[email protected]>

* add build for windows in dashboards-observability

Signed-off-by: Derek Ho <[email protected]>

* change windows command and add windows build for UI modules

Signed-off-by: Derek Ho <[email protected]>

* try gradlew bat for windows

Signed-off-by: Derek Ho <[email protected]>

* try to exclude tests

Signed-off-by: Derek Ho <[email protected]>

* fix jacoco

Signed-off-by: Derek Ho <[email protected]>

* do for mac and change name

Signed-off-by: Derek Ho <[email protected]>

* try to run the tests for windows and mac

Signed-off-by: Derek Ho <[email protected]>

* try to add gitattributes file

Signed-off-by: Derek Ho <[email protected]>

* add formatting rule

Signed-off-by: Derek Ho <[email protected]>

* try to enable both

Signed-off-by: Derek Ho <[email protected]>

* try to add git config to fix

Signed-off-by: Derek Ho <[email protected]>

* autocrlf false for windwos and remove comments

Signed-off-by: Derek Ho <[email protected]>

* comment out bwc tests,

Signed-off-by: Derek Ho <[email protected]>

* add line

Signed-off-by: Derek Ho <[email protected]>

* fix up using matrix and fix test

Signed-off-by: Derek Ho <[email protected]>

Signed-off-by: Derek Ho <[email protected]>
  • Loading branch information
derek-ho authored Oct 20, 2022
1 parent 8b390c2 commit 0e65c32
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ env:
jobs:

build:

runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}

steps:
- name: Checkout Plugin
Expand Down Expand Up @@ -57,13 +59,13 @@ jobs:
yarn test --coverage
- name: Upload coverage
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v1
with:
flags: dashboards-observability
directory: ./OpenSearch-Dashboards/plugins/dashboards-observability
token: ${{ secrets.CODECOV_TOKEN }}

# TODO remove hard coded version when observability is ready
- name: Build Artifact
run: |
cd OpenSearch-Dashboards/plugins/dashboards-observability
Expand All @@ -73,6 +75,5 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: dashboards-observability
path: ./OpenSearch-Dashboards/plugins/dashboards-observability/build

name: dashboards-observability-${{ matrix.os }}
path: ./OpenSearch-Dashboards/plugins/dashboards-observability/build
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ on: [pull_request, push]

jobs:
build:
env:
BUILD_ARGS: ${{ matrix.os_build_args }}
strategy:
matrix:
java:
- 11
- 17

runs-on: ubuntu-latest
java: [11, 17]
os: [ubuntu-latest, windows-latest, macos-latest]
include:
- os: windows-latest
os_build_args: -x integTest -x jacocoTestReport
- os: macos-latest
os_build_args: -x integTest -x jacocoTestReport
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v1
Expand All @@ -21,6 +26,8 @@ jobs:
java-version: ${{ matrix.java }}

- name: Run Backwards Compatibility Tests
# Temporarily only do this for linux
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
cd opensearch-observability
echo "Running backwards compatibility tests ..."
Expand All @@ -29,9 +36,10 @@ jobs:
- name: Build with Gradle
run: |
cd opensearch-observability
./gradlew build
./gradlew build ${{ env.BUILD_ARGS }}
- name: Upload coverage
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v1
with:
flags: opensearch-observability
Expand All @@ -46,5 +54,5 @@ jobs:
- name: Upload Artifacts
uses: actions/upload-artifact@v1
with:
name: opensearch-observability
path: opensearch-observability-builds
name: opensearch-observability-${{ matrix.os }}
path: opensearch-observability-builds
3 changes: 1 addition & 2 deletions public/components/event_analytics/explorer/no_results.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ export const NoResults = () => {
<p>
<FormattedMessage
id="discover.noResults.queryMayNotMatchTitle"
defaultMessage="Your query may not match anything in the current time range, or there may not be any data at all in
the currently selected time range. Try change time range, query filters or choose different time fields"
defaultMessage="Your query may not match anything in the current time range, or there may not be any data at all in the currently selected time range. Try change time range, query filters or choose different time fields"
/>
</p>
</EuiText>
Expand Down

0 comments on commit 0e65c32

Please sign in to comment.