-
Notifications
You must be signed in to change notification settings - Fork 227
/
.travis.yml
42 lines (37 loc) · 1.42 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
language: node_js
git:
depth: false
dist: trusty
sudo: required
matrix:
include:
- node_js: 10
env: TEST_SUITE=unit
install:
- npm i
- npm i -g codecov
script:
- npm run test:unit-ci
after_success:
- codecov
- node_js: 10
env: TEST_SUITE=lint
install: npm i
script: npm run lint
- node_js: 10
env: TEST_SUITE=types
install: npm i
script: npm run test:types
- node_js: 10
install: npm i
services:
- docker
env:
- TEST_SUITE=screenshots
- CURRENT_BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- CURRENT_SLUG=$(if [ "x$TRAVIS_PULL_REQUEST_SLUG" == "x" ]; then echo $TRAVIS_REPO_SLUG; else echo $TRAVIS_PULL_REQUEST_SLUG; fi)
before_install:
- docker pull mdcreact/screenshots
- docker image ls
script:
- docker run -it --rm --cap-add=SYS_ADMIN -e MDC_GCLOUD_SERVICE_ACCOUNT_KEY="${MDC_GCLOUD_SERVICE_ACCOUNT_KEY}" -e CURRENT_SLUG="${CURRENT_SLUG}" mdcreact/screenshots /bin/sh -c "git remote rm origin; git remote add origin https://github.com/${CURRENT_SLUG}; git checkout .; git fetch; git checkout \"${CURRENT_BRANCH}\"; git pull origin \"${CURRENT_BRANCH}\"; npm i; /home/pptruser/material-components-web-react/test/screenshot/start.sh; sleep 40s; npm run test:image-diff"