e6725e15af
This patch introduces a tiny test runner to run puppeteer tests. The test runner is self-container and allows parallel (wrt IO) test execution. It will also allow us to split tests into multiple files if necessary. Comparing to the jasmine, the testrunner supports parallel execution, properly handles "unhandled promise rejection" event and signals. Comparing to ava/jest, the testrunner doesn't run multiple node processes, which makes it simpler but sufficient for our goals.
31 lines
770 B
YAML
31 lines
770 B
YAML
language: node_js
|
|
dist: trusty
|
|
addons:
|
|
apt:
|
|
packages:
|
|
# This is required to run new chrome on old trusty
|
|
- libnss3
|
|
cache:
|
|
yarn: true
|
|
directories:
|
|
- node_modules
|
|
# allow headful tests
|
|
before_install:
|
|
- "export DISPLAY=:99.0"
|
|
- "sh -e /etc/init.d/xvfb start"
|
|
install:
|
|
- yarn install
|
|
# puppeteer's install script downloads Chrome
|
|
script:
|
|
- 'if [ "$NODE7" = "true" ]; then yarn run lint; fi'
|
|
- 'if [ "$NODE7" = "true" ]; then yarn run coverage; fi'
|
|
- 'if [ "$NODE7" = "true" ]; then yarn run test-doclint; fi'
|
|
- 'if [ "$NODE6" = "true" ]; then yarn run build; fi'
|
|
- 'if [ "$NODE6" = "true" ]; then yarn run unit-node6; fi'
|
|
jobs:
|
|
include:
|
|
- node_js: "7.6.0"
|
|
env: NODE7=true
|
|
- node_js: "6.4.0"
|
|
env: NODE6=true
|