forked from sequelize/sequelize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
87 lines (80 loc) · 2.56 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
sudo: false
dist: trusty
language: node_js
branches:
only:
- master
- v3
- /^greenkeeper/.*$/
except:
- /^v\d+\.\d+\.\d+$/
cache:
directories:
- node_modules
env:
global:
# mysql info
- SEQ_MYSQL_DB=sequelize_test
- SEQ_MYSQL_USER=sequelize_test
- SEQ_MYSQL_PW=sequelize_test
- SEQ_MYSQL_HOST=127.0.0.1
- SEQ_MYSQL_PORT=8999
# postgres info
- SEQ_PG_DB=sequelize_test
- SEQ_PG_USER=sequelize_test
- SEQ_PG_PW=sequelize_test
- SEQ_PG_HOST=127.0.0.1
- SEQ_PG_PORT=8998
before_script:
# mount ramdisk
- "if [ $POSTGRES_VER ] || [ $MYSQL_VER ]; then sudo mkdir /mnt/sequelize-ramdisk; fi"
- "if [ $POSTGRES_VER ] || [ $MYSQL_VER ]; then sudo mount -t ramfs tmpfs /mnt/sequelize-ramdisk; fi"
# setup docker
- "if [ $POSTGRES_VER ] || [ $MYSQL_VER ]; then docker-compose up -d ${POSTGRES_VER} ${MYSQL_VER}; fi"
- "if [ $MYSQL_VER ]; then docker run --link ${MYSQL_VER}:db -e CHECK_PORT=3306 -e CHECK_HOST=db --net sequelize_default giorgos/takis; fi"
- "if [ $POSTGRES_VER ]; then docker run --link ${POSTGRES_VER}:db -e CHECK_PORT=5432 -e CHECK_HOST=db --net sequelize_default giorgos/takis; fi"
script:
- npm run lint
- "if [ $COVERAGE ]; then npm run cover && bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info; else npm run test; fi"
jobs:
include:
- stage: tests
node_js: 4
env: DIALECT=sqlite COVERAGE=true
- stage: tests
node_js: 4
sudo: required
env: MYSQL_VER=mysql-57 DIALECT=mysql COVERAGE=true
- stage: tests
node_js: 4
sudo: required
env: POSTGRES_VER=postgres-95 DIALECT=postgres COVERAGE=true
- stage: tests
node_js: 4
sudo: required
env: POSTGRES_VER=postgres-95 DIALECT=postgres-native COVERAGE=true
- stage: tests
node_js: 8
env: DIALECT=sqlite
- stage: tests
node_js: 6
env: DIALECT=sqlite
- stage: docs
node_js: 6
script:
- 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ]; then npm run docs; fi'
deploy:
provider: surge
project: ./esdoc/
domain: docs.sequelizejs.com
skip_cleanup: true
on:
branch: master
- stage: release
node_js: 8
env: BUILD_LEADER_ID=8
script:
- npm install --no-save --no-package-lock semantic-release@8 @bubltechnology/[email protected]
- npm run lint
after_success:
- ./node_modules/.bin/semantic-release pre && npm publish && ./node_modules/.bin/semantic-release post