yunkong2.sql/.travis.yml
2018-08-08 21:31:17 +08:00

35 lines
1.1 KiB
YAML

os:
- linux
- osx
language: node_js
node_js:
- '4'
- '6'
- '8'
- '10'
services:
- mysql
- postgresql
before_install:
- 'if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export export CXX=g++-4.8; fi'
before_script:
- export NPMVERSION=$(echo "$($(which npm) -v)"|cut -c1)
- 'if [[ $NPMVERSION == 5 ]]; then npm install -g npm@5; fi'
- npm -v
- 'if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi'
- 'if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install mariadb && mysql.server start; fi'
- 'if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rm -rf /usr/local/var/postgres; fi'
- 'if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then initdb /usr/local/var/postgres; fi'
- 'if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pg_ctl -D /usr/local/var/postgres start; fi'
- 'if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sleep 5; fi'
- 'if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then createuser -s postgres; fi'
- sleep 15
- npm install winston@2.3.1
- 'npm install https://git.spacen.net/yunkong2/yunkong2.js-controller/tarball/master --production'
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8