Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Commit 385854f

Browse files
authored
Adds test workflow and updates snapshot (#121)
1 parent 048deba commit 385854f

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed
+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Unit tests workflow
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
7+
jobs:
8+
tests:
9+
name: Run unit tests
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout Kibana
13+
uses: actions/checkout@v2
14+
with:
15+
repository: opendistro-for-elasticsearch/kibana-oss
16+
ref: 7.6.1
17+
token: ${{ secrets.GITHUB_KIBANA_OSS }}
18+
path: kibana
19+
- name: Get node and yarn versions
20+
id: versions_step
21+
run: |
22+
echo "::set-output name=node_version::$(node -p "(require('./kibana/package.json').engines.node).match(/[.0-9]+/)[0]")"
23+
echo "::set-output name=yarn_version::$(node -p "(require('./kibana/package.json').engines.yarn).match(/[.0-9]+/)[0]")"
24+
- name: Setup node
25+
uses: actions/setup-node@v1
26+
with:
27+
node-version: ${{ steps.versions_step.outputs.node_version }}
28+
registry-url: 'https://registry.npmjs.org'
29+
- name: Install correct yarn version for Kibana
30+
run: |
31+
npm uninstall -g yarn
32+
echo "Installing yarn ${{ steps.versions_step.outputs.yarn_version }}"
33+
npm i -g yarn@${{ steps.versions_step.outputs.yarn_version }}
34+
- name: Checkout Alerting Kibana plugin
35+
uses: actions/checkout@v2
36+
with:
37+
path: kibana/plugins/alerting-kibana-plugin
38+
- name: Bootstrap plugin/kibana
39+
run: |
40+
cd kibana/plugins/alerting-kibana-plugin
41+
yarn kbn bootstrap
42+
- name: Run tests
43+
run: |
44+
cd kibana/plugins/alerting-kibana-plugin
45+
yarn run test:jest

public/pages/CreateTrigger/components/TriggerQuery/__snapshots__/TriggerQuery.test.js.snap

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ exports[`TriggerQuery renders 1`] = `
5252
>
5353
<EuiCodeEditor
5454
height="200px"
55+
mode="plain_text"
5556
readOnly={true}
5657
setOptions={Object {}}
5758
theme="github"

0 commit comments

Comments
 (0)