forked from sequelize/sequelize
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
85 lines (76 loc) · 2.31 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
sudo: true
dist: trusty
language: node_js
branches:
only:
- master
except:
- /^v\d+\.\d+\.\d+$/
cache: npm
install:
- npm ci
- |-
if [ "$DIALECT" = "postgres-native" ]; then npm install pg-native; fi
env:
global:
- SEQ_DB=sequelize_test
- SEQ_USER=sequelize_test
- SEQ_PW=sequelize_test
- SEQ_HOST=127.0.0.1
- COVERAGE=true
before_script:
# setup docker
- if [ $MARIADB_VER ]; then export MARIADB_ENTRYPOINT=$TRAVIS_BUILD_DIR/test/config/mariadb; fi
- if [ $MYSQL_VER ]; then export MYSQLDB_ENTRYPOINT=$TRAVIS_BUILD_DIR/test/config/mysql; fi
- if [ $POSTGRES_VER ] || [ $MARIADB_VER ] || [ $MYSQL_VER ]; then docker-compose up -d ${POSTGRES_VER} ${MARIADB_VER} ${MYSQL_VER}; fi
- wait_for() { docker run --net sequelize_default jwilder/dockerize -timeout 2m -wait "$1"; }
- if [ $POSTGRES_VER ]; then wait_for tcp://${POSTGRES_VER}:5432; fi
- if [ $MARIADB_VER ]; then wait_for tcp://${MARIADB_VER}:3306; fi
- if [ $MYSQL_VER ]; then wait_for tcp://${MYSQL_VER}:3306; fi
script:
- npm run tsc
- npm run cover && bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info
jobs:
include:
- stage: lint
node_js: '12'
script:
- npm run lint
- npm run lint-docs
- stage: test
node_js: '12'
env: DIALECT=sqlite
- stage: test
node_js: '12'
sudo: required
env: MARIADB_VER=mariadb-105 SEQ_MARIADB_PORT=8960 DIALECT=mariadb
- stage: test
node_js: '12'
sudo: required
env: MYSQL_VER=mysql-57 SEQ_MYSQL_PORT=8980 DIALECT=mysql
- stage: test
node_js: '12'
sudo: required
env: POSTGRES_VER=postgres-10 SEQ_PG_PORT=8991 DIALECT=postgres
- stage: test
node_js: '12'
sudo: required
env: POSTGRES_VER=postgres-10 SEQ_PG_PORT=8991 SEQ_PG_MINIFY_ALIASES=1 DIALECT=postgres
script:
- npm run tsc
- npm run cover-integration
- bash <(curl -s https://codecov.io/bash) -f coverage/integration.info
- stage: test
node_js: '12'
sudo: required
env: POSTGRES_VER=postgres-95 SEQ_PG_PORT=8990 DIALECT=postgres-native
- stage: release
node_js: '12'
script:
- npm run tsc
#- npm run semantic-release
stages:
- lint
- test
- name: release
if: branch = master AND type = push AND fork = false