|
1 | 1 | language: node_js |
2 | | -node_js: |
3 | | - - 8.10.0 |
4 | | - - 10 |
5 | | - - 11 |
6 | | -os: |
7 | | - - windows |
8 | | - - osx |
9 | | - - linux |
| 2 | +node_js: '11' |
10 | 3 | dist: xenial |
11 | | -script: npm test |
12 | 4 | # When pushing a tagged commit, Travis adds two builds: one with the tag, one |
13 | 5 | # without. We only want to build the one with the tag, because it's the one |
14 | 6 | # that runs the deployment stage |
15 | 7 | if: '!(commit_message =~ /^Release/ && tag is blank)' |
16 | 8 | jobs: |
17 | 9 | include: |
| 10 | + # Test on Windows/Mac/Linux using latest Node.js. |
| 11 | + # Also test on Linux with older Node.js versions. |
| 12 | + # We do not run each possible combination to make CI faster. |
| 13 | + - os: windows |
| 14 | + - os: osx |
| 15 | + - node_js: '8.10.0' |
| 16 | + - node_js: '10' |
| 17 | + - node_js: '11' |
18 | 18 | # Test coverage check must happen after tests for the whole matrix have |
19 | 19 | # been performed, so we get the merged coverage map |
20 | 20 | - stage: Coverage check |
21 | | - os: linux |
22 | | - node_js: 11 |
| 21 | + # If this fails during a PR, CI will fail. However when CI fails, codecov |
| 22 | + # does not post any comment. Since codecov comments are nicer than |
| 23 | + # Travis Buddy comments for this, we skip it during PRs. Also this makes |
| 24 | + # PRs checks faster. |
| 25 | + if: type != pull_request |
23 | 26 | script: gulp coverage |
24 | | - # If CI fails, codecov does not post a bot comment on PR, so we skip it |
25 | | - if: type != pull_request && (branch == master || tag is not blank) |
26 | 27 | # Deployment must happen after tests for the whole matrix have been |
27 | | - # performed, so we use `jobs.include` with a different `stage` |
| 28 | + # performed, so we use `jobs.include` with a different `stage`. |
28 | 29 | - stage: Deploy |
29 | | - os: linux |
30 | | - node_js: 11 |
31 | | - # We have already run tests |
32 | | - script: gulp build |
33 | | - if: tag is not blank |
34 | | - # We run `release-it` locally (which tagged the commit and create a |
35 | | - # GitHub release) but we publish to npm only after CI success. |
36 | | - deploy: |
37 | | - provider: npm |
38 | | - |
39 | | - api_key: |
40 | | - secure: KyZ9E2N+Tt7fh6cI4HmjTC+Ra/HCLhu0WsWIRmSnJW0K6VaLbXzrKX7YcgALanbiMhSUEQynU+zdMMK351+bdkksi6H5FqXWfQ//Lf8WiyDwTbpMloPAxkclnJYMc10iZgc98AnkzrZU5qRM70MrJ9hM0d9aRq1GDm80Us6buoobMubj2d4wG/0y5c78dxajkFW300AWgM0Z/gJNSsY7l9qtOI4jrKrpoi3Zitd2SUDXoxzFsngsx2+4LpjLjUMljo3KSMmExbqGdK927KuNCIFIuuLoYussPgftrym2zZZ19XLQNpnJcEmynuwsZLAK9O/2kEo6AkqRF1OYe28sVgu1caLz2L3CilL/tK6r+QCxa4bR3G2ybBu+MEO9zh2oAOOF21YcAt3mOaozNPBwlY8hhKrsbjt9TGaR6S6vv8k3XNDAbet/2FJHcgecmc3gKFski6xkl1U0rOow8ES4BSiKp+QNBiLs01aze+wmYQoKTHA/XdegMK0lCaSk1IjYFMoO6I9ZAeTThdaXPhtqnoD15lp9W4CnPyFIR6FICenwLjFufrvcaPfD33Os35nFAdAJGhWOEDko27EkT+GP5ziMhmdzQm1exrdkPi6vAxBpY3dd2Mp2Svnm1ww0b/r7jtEgY8yAvmQLQX6ZqgUalFcX5A88f5tcIQrPDizRS8Y= |
41 | | - on: |
42 | | - tags: true |
43 | | - # We want to run install step and keep built files for release |
44 | | - skip_cleanup: true |
| 30 | + if: type != pull_request && branch == master && tag is not blank |
| 31 | + script: gulp publish |
| 32 | + # NPM_TOKEN environment variable |
| 33 | + env: |
| 34 | + secure: "GOX/5ZEXx52rOuEE3ZIuLkeFawahndkPyhkJihHWiXkUDfwIqy7TAS+opPPwFp41WTEoJMwFs8mhgTHEG6P3NkDI6EhuKgke3ynvIdLE/kmB6RFzXjJrco76OFcE/gv9+w/245GULv66RRX3iEs+8oExthZvD0TxE2kmCMVfP08XKS6n+BdsM77+FDx5wArxr5nQ67Ho4iefvHQtiDSjDIbMDgvH/VFEXEUqznwgh4YiUkx8yfiO3Kr/Xc8C09+mSJsoXyYN0xcug35NXxya7unC33ws0Dc+Lw5X2NFu1jfqS6say2Zgl3+WRGSyixOMgS/bOuwkGqVwNOnwgQWWQwqQEbg+y3UpOb+bIdWQimun5oNzfzSG+WxmjTIqHi+OVhoPUIN0INwymksP2llAWrJb8dKUUh/0yYkAevdfBelULJ1aI6k2xNQgNPw8wT62ukPygRtroYJ/GFJBf3G5OKFUUVgNYE4qVTdUz+3XlUEbGCELp4Fgbzh5QTkmuUgHJAVAYhckx7Z7ggAyz0x5RkdlOu0bgj9vFXDMLA5bZatJ5NvUWDpcZ2cY9mwHC44A7KRZYnhKauBVjSH2yYU4bTJFQ8s7JWLxzh2gWpXGGZCOj14c1o3Kzs865X91I+2T2EJsS+N3NLWcL5YWtDS7TVuyTUNAZW0bUTucdnh3RiI=" |
45 | 35 | notifications: |
46 | 36 | webhooks: |
47 | 37 | - https://www.travisbuddy.com?only=failed,errored&insertMode=update |
|
0 commit comments