Split browser and non-browser targetting js test jobs

Some javascript operations, like running tests for web-apps, need
browsers. Javascript packages that are not targetting browsers
do not.

Make a -browser version that installs the browsers and xvfb, and
a non-browser version that does not.

Change-Id: I33c12cb0d9516bdffef7d8d04af4dbcb03ed8355
This commit is contained in:
Monty Taylor 2020-05-12 10:32:04 -05:00
parent 5973c9b7b1
commit 0caa85cc48
3 changed files with 27 additions and 1 deletions

View File

@ -6,5 +6,6 @@ Javascript Jobs
.. zuul:autojob:: build-javascript-deployment-tarball
.. zuul:autojob:: js-build
.. zuul:autojob:: nodejs-run-test
.. zuul:autojob:: nodejs-run-test-browser
.. zuul:autojob:: nodejs-run-lint
.. zuul:autojob:: nodejs-run-docs

View File

@ -129,6 +129,31 @@
- job:
name: nodejs-run-test
parent: js-build
description: |
Run test using nodejs.
Responds to these variables:
.. zuul:jobvar:: node_version
:default: 14
The version of Node to use.
.. zuul:jobvar:: zuul_work_dir
:default: {{ zuul.project.src_dir }}
Path to operate in.
.. zuul:jobvar:: javascript_content_dir
:default: dist
Directory, relative to zuul_work_dir, holding build content.
vars:
js_build_command: test
- job:
name: nodejs-run-test-browser
parent: js-build
description: |
Run test using nodejs. This test also starts Xvfb for run time
tests.
@ -149,7 +174,7 @@
:default: dist
Directory, relative to zuul_work_dir, holding build content.
pre-run: playbooks/javascript/pre-test.yaml
pre-run: playbooks/javascript/browser.yaml
vars:
js_build_command: test