Skip to content

Commit

Permalink
Support windows CI (#354)
Browse files Browse the repository at this point in the history
* Support windows CI

Signed-off-by: Ashish Agrawal <[email protected]>

Signed-off-by: Ashish Agrawal <[email protected]>
(cherry picked from commit db49f60)
  • Loading branch information
lezzago authored and github-actions[bot] committed Nov 4, 2022
1 parent a83ad23 commit cde6a1e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/unit-tests-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,19 @@ on:
branches:
- "*"
env:
OPENSEARCH_DASHBOARDS_VERSION: '2.2'
OPENSEARCH_DASHBOARDS_VERSION: '2.4'
jobs:
tests:
name: Run unit tests
runs-on: ubuntu-latest
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
# Enable longer filenames for windows
- name: Enable longer filenames
if: ${{ matrix.os == 'windows-latest' }}
run: git config --system core.longpaths true
- name: Checkout OpenSearch Dashboards
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -42,9 +49,16 @@ jobs:
run: |
cd OpenSearch-Dashboards/plugins/alerting-dashboards-plugin
yarn osd bootstrap
- name: Run tests
- name: Run window tests
if: ${{ matrix.os == 'windows-latest' }}
run: |
cd OpenSearch-Dashboards/plugins/alerting-dashboards-plugin
yarn run test:jest:windows --coverage
- name: Run non-window tests
if: ${{ matrix.os != 'windows-latest' }}
run: |
cd OpenSearch-Dashboards/plugins/alerting-dashboards-plugin
yarn run test:jest --coverage
- name: Uploads coverage
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: codecov/codecov-action@v1
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"osd": "node ../../scripts/osd",
"opensearch": "node ../../scripts/opensearch",
"lint": "../../node_modules/.bin/eslint '**/*.js' -c .eslintrc --ignore-path .gitignore",
"test:jest:windows": "SET TZ=UTC ../../node_modules/.bin/jest --config ./test/jest.config.js",
"test:jest": "TZ=UTC ../../node_modules/.bin/jest --config ./test/jest.config.js",
"build": "yarn plugin-helpers build",
"plugin-helpers": "node ../../scripts/plugin_helpers",
Expand Down

0 comments on commit cde6a1e

Please sign in to comment.