forked from bem/bem-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
83 lines (73 loc) · 3.07 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
language: node_js
node_js:
- "4"
# sudo=false to run builds inside container infrastructure
# see https://github.com/bem/bem-components/issues/1528
sudo: false
env:
global:
- CXX: g++-4.8
- GH_REF: github.com/bem/bem-components.git
- ISTANBUL_COVERAGE: yes
# SAUCE_USERNAME
- secure: "Z21+fRlqB/e47iLnKKyfp1J2R9aXbytXbToOQ6k6/7UJWp0Zg1VnYJ/m8g+uoTj1s7WqBx6hdly9bPVtiQ6/WWUIek50Q6xrx0j1X3aWWeLDCyCFE3nwBeLu0YNXQehF8TPfdWoxLNy9g4Y2tX0RPQCZ8aeV639d+6Hc4Etjp+E="
# SAUCE_ACCESS_KEY
- secure: "L0m7LKhlXK3hob+0jwVCAE7qGd9x+9shMN8OthTTV7lHyz83Ypv3FMEKQtDYho9d24i1SidJbtvpFrkKBLGkn94JzrNE/8UcKPNiIWLHc2bvQ15/aS2XH7nrloWLI8hoavs0A3dJUCFyPY8auRop4Z/vOnFZuDBGuziyZFuZeds="
# GH_TOKEN
- secure: "bGov22gdjFLUhVeeTv8i2fLgE8fWfd97kxIg8tiuKsO58YJlhKTqmmTKpx7u26kHc+4lZxXFndWpdE7YYyKp7n3OIOjAaGIiVHX5z0SaoNSjvN9BmE4EElnJbYjwSr9UxNmJWde8RQLBRjrBLuXvn3e1E93GjoB5rzSL9bRDT/s="
matrix:
- TEST_SCOPE: specs
- TEST_SCOPE: tmpls
- TEST_SCOPE: gemini
- TEST_SCOPE: dists
matrix:
fast_finish: true
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
branches:
except:
- v1
- master
before_install:
- |
if [ "${TEST_SCOPE}" == "gemini" ] && [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
if [ ! "$SAUCE_USERNAME" -a ! "$SAUCE_ACCESS_KEY" ]; then
true && export `base64 --decode <<< U0FVQ0VfVVNFUk5BTUU9YmVtLWluZm8K`
true && export `base64 --decode <<< U0FVQ0VfQUNDRVNTX0tFWT0yODFiNGMzNy02YWYzLTRmMGEtOGRmYi0xYmUzMjY1OGNiOTQK`
fi
curl https://api.github.com/repos/bem/bem-components/pulls/$TRAVIS_PULL_REQUEST/files?per_page=100 | grep '"filename":.*"' | grep -v '\.md"' >/dev/null || (echo "Gemini tests skipped!" && exit 0)
fi
before_script:
- npm install pull-github-notify minimist
- |
if [ "${TRAVIS_PULL_REQUEST}" != "false" ] && [ "${TEST_SCOPE}" == "specs" ] && [ "${TRAVIS_SECURE_ENV_VARS}" != "false" ]; then
node notify.js --clear
fi
- |
if [ "${TEST_SCOPE}" == "gemini" -o "${TEST_SCOPE}" == "dists" ]; then
if [ ! "$SAUCE_USERNAME" -a ! "$SAUCE_ACCESS_KEY" ]; then
true && export `base64 --decode <<< U0FVQ0VfVVNFUk5BTUU9YmVtLWluZm8K`
true && export `base64 --decode <<< U0FVQ0VfQUNDRVNTX0tFWT0yODFiNGMzNy02YWYzLTRmMGEtOGRmYi0xYmUzMjY1OGNiOTQK`
fi
curl -L https://gist.githubusercontent.com/tadatuta/3303b14f47dbee9ca079/raw/sauce-connect.sh | bash
cat .gemini.yml
fi
after_success:
- |
if [ "${TEST_SCOPE}" == "specs" ]; then
npm install coveralls
node_modules/.bin/istanbul report lcovonly
cat coverage/lcov.info | node_modules/coveralls/bin/coveralls.js && echo "Coverage data was sent to coveralls!"
if [ "${TRAVIS_PULL_REQUEST}" != "false" ] && [ "${TRAVIS_SECURE_ENV_VARS}" != "false" ]; then
sh publish_showcase.sh
fi
fi
after_failure:
- |
if [ "${TRAVIS_PULL_REQUEST}" != "false" ] && [ "${TEST_SCOPE}" == "gemini" ] && [ "${TRAVIS_SECURE_ENV_VARS}" != "false" ]; then
sh publish_report.sh
fi