forked from material-components/material-components-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
78 lines (66 loc) · 2.22 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
language: node_js
# Force Travis CI to run jobs in VMs instead of Docker containers.
# - https://blog.travis-ci.com/2018-10-04-combining-linux-infrastructures
# - https://docs.travis-ci.com/user/reference/trusty/#fully-virtualized-via-sudo-required
sudo: required
branches:
# Only run Travis on:
# A) Commits made directly to the `master` branch (i.e., merged PRs); and
# B) PRs that will eventually be merged into `master`.
# This prevents excessive resource usage and CI slowness.
only:
- master
before_install:
# Source the scripts to export their env vars. See https://superuser.com/a/176788/62792
- source scripts/travis-env-vars.sh
install:
- if has_testable_files; then npm install; fi
# Noisy output, but useful for debugging npm package dependency version issues:
#- npm ls
after_script:
# Prevent Travis job logs from getting truncated early.
# See https://github.com/travis-ci/travis-ci/issues/6421#issuecomment-238137337
- sleep 5
matrix:
include:
- node_js: 8
env:
- TEST_SUITE=lint
script:
- if has_testable_files; then npm run lint; else log_untestable_files; fi
- node_js: 8
env:
- TEST_SUITE=build
script:
- if has_testable_files; then npm run build; else log_untestable_files; fi
- node_js: 8
env:
- TEST_SUITE=unit
addons:
sauce_connect: true
script:
- if has_testable_files; then npm run test:unit && npm run posttest; else log_untestable_files; fi
after_success:
- codecov
- node_js: 8
env:
- TEST_SUITE=closure
- CLOSURE=1
script:
- if has_testable_files; then npm run test:closure; else log_untestable_files; fi
- node_js: 8
env:
- TEST_SUITE=site-generator
script:
- if has_testable_files; then npm run test:site; else log_untestable_files; fi
- node_js: 8
env:
- TEST_SUITE=screenshot
git:
depth: 200
before_install: # Override global settings
# Source the scripts to export their env vars. See https://superuser.com/a/176788/62792
- source scripts/travis-env-vars.sh
- source test/screenshot/infra/commands/travis.sh
script:
- if has_testable_files; then npm run screenshot:test; else log_untestable_files; fi