Skip to content

Commit 9a7045d

Browse files
[OV JS] Add e2e test of openvino-node package as electron app dependency (openvinotoolkit#25522)
### Details: - Implement initial e2e testing ### Tickets: - 146346 --------- Co-authored-by: Alicja Miloszewska <alicja.miloszewska@intel.com>
1 parent f8c7ccc commit 9a7045d

19 files changed

+638
-62
lines changed

.github/workflows/job_openvino_js.yml

+12-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ jobs:
2828
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
2929
OPENVINO_JS_DIR: ${{ github.workspace }}/openvino/src/bindings/js
3030
OPENVINO_JS_LIBS_DIR: ${{ github.workspace }}/openvino/src/bindings/js/node/bin
31-
NODE_VERSION: 20
31+
NODE_VERSION: 21
32+
DISPLAY: ':99'
3233
steps:
3334
- name: Fetch OpenVINO JS sources
3435
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
@@ -61,3 +62,13 @@ jobs:
6162
- name: Test OpenVINO JS API
6263
working-directory: ${{ env.OPENVINO_JS_DIR }}/node
6364
run: npm run test
65+
66+
- name: Install electron deps and run Xvfb
67+
if: runner.os == 'Linux'
68+
run: |
69+
apt-get update && apt-get install -y xvfb libgtk-3-0 libgbm1
70+
Xvfb "$DISPLAY" &
71+
72+
- name: E2E of openvino-node package
73+
working-directory: ${{ env.OPENVINO_JS_DIR }}/node
74+
run: npm run test:e2e

.github/workflows/windows.yml

+18-5
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ jobs:
339339
env:
340340
OPENVINO_JS_DIR: "${{ github.workspace }}\\openvino\\src\\bindings\\js"
341341
OPENVINO_JS_LIBS_DIR: "${{ github.workspace }}\\openvino\\src\\bindings\\js\\node\\bin"
342+
NODE_VERSION: 21
342343
if: fromJSON(needs.smart_ci.outputs.affected_components).JS_API
343344

344345
steps:
@@ -355,24 +356,36 @@ jobs:
355356
name: openvino_js_package
356357
path: ${{ env.OPENVINO_JS_LIBS_DIR }}
357358

358-
- name: Setup Node
359+
- name: Setup Node ${{ env.NODE_VERSION }}
359360
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
360361
with:
361-
node-version: 20
362+
node-version: ${{ env.NODE_VERSION }}
362363

363-
- name: Configure OpenVINO JS
364+
- name: Configure OpenVINO JS API
364365
working-directory: ${{ env.OPENVINO_JS_DIR }}/node
365366
run: npm i
366367

367-
- name: Test OpenVINO JS
368+
- name: Test OpenVINO JS API
368369
working-directory: ${{ env.OPENVINO_JS_DIR }}/node
369370
run: npm test
370371

371-
- name: Test OpenVINO JS (cmd)
372+
- name: Test OpenVINO JS API (cmd)
372373
shell: cmd
373374
working-directory: ${{ env.OPENVINO_JS_DIR }}/node
374375
run: call npm test
375376

377+
- name: Add msbuild to PATH
378+
uses: microsoft/setup-msbuild@v2
379+
380+
- name: E2E of openvino-node package
381+
working-directory: ${{ env.OPENVINO_JS_DIR }}/node
382+
run: npm run test:e2e
383+
384+
- name: E2E of openvino-node package (cmd)
385+
shell: cmd
386+
working-directory: ${{ env.OPENVINO_JS_DIR }}/node
387+
run: call npm run test:e2e
388+
376389
- name: Create package dir
377390
working-directory: ${{ env.OPENVINO_JS_DIR }}
378391
run: mkdir project-uses-openvino-node

samples/js/node/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
"lint": "eslint ."
1616
},
1717
"engines": {
18-
"node": ">=20.5.1"
18+
"node": ">=21.0.0"
1919
}
2020
}

0 commit comments

Comments
 (0)