forked from loopbackio/loopback-next
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
107 lines (100 loc) · 3.63 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
sudo: false
language: node_js
node_js:
- "10"
- "12"
- "13"
os:
- linux
script:
- npm run postinstall
- npm run build
- npm run test:ci
env: TASK=test
install: npm ci --ignore-scripts
after_success:
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]] && [[ $(echo $TRAVIS_NODE_VERSION | cut -d'.' -f1) == "10" ]]; then npm run coverage:ci; fi
matrix:
include:
- node_js: "12"
os: osx
# using the default script to build & run the tests
- node_js: "12"
os: linux
env: TASK=code-lint
# Running Code Linter -- Requires @loopback/build so it's bootstrapped
# We actually need to bootstrap all packages, otherwise typescript-eslint
# is not able to access type information for dependencies
script:
- lerna bootstrap
- npm run lint
- node_js: "12"
os: linux
env: TASK=commit-lint
script: commitlint-travis
- node_js: "12"
os: linux
env: TASK=verify-docs
script: ./bin/verify-doc-changes.sh
- node_js: "12"
os: linux
env:
- TASK=test-repository-mongodb
services:
- mongodb
script:
- npm run postinstall -- --scope "@loopback/test-repository-mongodb" --include-dependencies
- npm run build -- --scope "@loopback/test-repository-mongodb" --include-dependencies
- cd acceptance/repository-mongodb && npm run mocha
- node_js: "12"
os: linux
env:
- TASK=test-repository-mysql
- MYSQL_USER=test
- MYSQL_PASSWORD=test
services:
- mysql
before_install:
- mysql -u root -e "CREATE USER 'test'@'localhost' IDENTIFIED BY 'test';"
- mysql -e "use mysql; update user set authentication_string=PASSWORD('test') where User='test'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;"
- mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'test'@'localhost' WITH GRANT OPTION;FLUSH PRIVILEGES;"
- mysql -e "GRANT SUPER ON *.* TO 'test'@'localhost' IDENTIFIED BY 'test';FLUSH PRIVILEGES;"
script:
- npm run postinstall -- --scope "@loopback/test-repository-mysql" --include-dependencies
- npm run build -- --scope "@loopback/test-repository-mysql" --include-dependencies
- cd acceptance/repository-mysql && npm run mocha
- node_js: "12"
os: linux
env:
- TASK=test-repository-postgresql
- POSTGRESQL_USER=postgres
services:
- postgresql
script:
- npm run postinstall -- --scope "@loopback/test-repository-postgresql" --include-dependencies
- npm run build -- --scope "@loopback/test-repository-postgresql" --include-dependencies
- psql -U postgres -a -f acceptance/repository-postgresql/test/schema.sql
- cd acceptance/repository-postgresql && npm run mocha
- node_js: "12"
os: linux
env:
- TASK=test-repository-cloudant
script:
# set up docker image and create admin for cloudant.
- npm run postinstall -- --scope "@loopback/test-repository-cloudant" --include-dependencies
- npm run build -- --scope "@loopback/test-repository-cloudant" --include-dependencies
- cd acceptance/repository-cloudant && sh setup.sh
- npm test
- node_js: "12"
os: linux
env:
- TASK=test-extension-logging-fluentd
services:
- docker
script:
- npm run postinstall -- --scope "@loopback/test-extension-logging-fluentd" --include-dependencies
- npm run build -- --scope "@loopback/test-extension-logging-fluentd" --include-dependencies
- cd acceptance/extension-logging-fluentd && npm run mocha
branches:
only:
- master