-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
67 lines (53 loc) · 1.37 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
language: node_js
cache: npm
node_js:
- 8
- 10
- 12
- 14
- 15
sudo: false
branches:
only:
- master
- /^greenkeeper/.*$/
env:
matrix:
- SEQUELIZE_VERSION=4.*
- SEQUELIZE_VERSION=5.*
- SEQUELIZE_VERSION=6.*
global:
- TEST=1
matrix:
fast_finish: true
include:
- node_js: 14
env: TEST=0 LINT=1
- node_js: 14
env: TEST=0 COVERAGE=1
- stage: deploy
node_js: 15
env: TEST=0 COVERAGE=0 LINT=0
script:
- echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
- git remote rm origin
- git remote add origin https://alt3:${GITHUB_TOKEN}@github.com/alt3/sequelize-to-json-schemas.git
- git symbolic-ref HEAD refs/heads/master
- npm run release
on:
branch: master
if: "branch = master AND type = push AND commit_message !~ /(?i:no-release)|^(?i:chore: release)/"
allow_failures:
- env: SEQUELIZE_VERSION=6
before_script:
- sh -c "if [ '$TEST' = '1' ]; then npm install sequelize@$SEQUELIZE_VERSION; fi"
script:
- sh -c "if [ '$TEST' = '1' ]; then npm run test; fi"
- sh -c "if [ '$LINT' = '1' ]; then npm run lint; fi"
- sh -c "if [ '$COVERAGE' = '1' ]; then npm run coverage; fi"
after_success:
- if [[ $COVERAGE == 1 ]]; then bash <(curl -s https://codecov.io/bash); fi
notifications:
email:
on_success: never
on_failure: always