.travis.yml 643 Bytes
Newer Older
nikogu's avatar
nikogu committed
1 2 3 4
language: node_js

node_js:
  - "8"
偏右's avatar
偏右 committed
5 6 7 8

env:
  matrix:
    - TEST_TYPE=lint
Wei Zhu's avatar
Wei Zhu committed
9
    - TEST_TYPE=build
偏右's avatar
偏右 committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
    - TEST_TYPE=test-all
    - TEST_TYPE=test-dist

addons:
  apt:
    packages:
      - xvfb

install:
  - export DISPLAY=':99.0'
  - Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
  - npm install

script:
  - |
    if [ "$TEST_TYPE" = lint ]; then
      npm run lint
Wei Zhu's avatar
Wei Zhu committed
27 28
    elif [ "$TEST_TYPE" = build ]; then
      npm run build
偏右's avatar
偏右 committed
29 30 31 32 33 34
    elif [ "$TEST_TYPE" = test-all ]; then
      npm run test:all
    elif [ "$TEST_TYPE" = test-dist ]; then
      npm run site
      mv dist/* ./
      php -S localhost:8000 &
afc163's avatar
afc163 committed
35
      DEBUG=* npm test .e2e.js
偏右's avatar
偏右 committed
36
    fi