-
Notifications
You must be signed in to change notification settings - Fork 8
/
.travis.yml
89 lines (83 loc) · 2.11 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
84
85
86
87
88
89
language: sh
os:
- linux
- osx
- windows
dist: trusty
services: docker
env:
global:
- DOCKER_COMPOSE_VERSION=1.13.0
matrix:
include:
- os: linux
env: DIST=busybox
- os: linux
env: SH=ash DIST=alpine
- os: linux
env: SH=bash DIST=alpine
- os: linux
env: SH=bash DIST=debian
- os: osx
env: SH=bash
- os: linux
env: SH=dash DIST=alpine
- os: linux
env: SH=dash DIST=debian
- os: osx
env: SH=dash
- os: linux
env: SH=ksh DIST=alpine
- os: linux
env: SH=ksh DIST=debian
- os: osx
env: SH=ksh
- os: linux
env: SH=zsh DIST=alpine
- os: linux
env: SH=zsh DIST=debian
- os: osx
env: SH=zsh
- os: windows
env: SH=bash
exclude:
# https://github.com/travis-ci/travis-ci/issues/4681
- os: linux
- os: osx
- os: windows
before_install:
- |
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
brew update
brew install coreutils ${SH}
sh -c "`curl -L https://raw.github.com/rylnd/shpec/master/install.sh`"
elif [[ $TRAVIS_OS_NAME == "windows" ]]; then
choco install make
sh -c "`curl -L https://raw.github.com/rylnd/shpec/master/install.sh`"
else
# latest docker
sudo apt-get update
sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-engine
docker --version
# docker compose
sudo rm /usr/local/bin/docker-compose
curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
chmod +x docker-compose
sudo mv docker-compose /usr/local/bin
fi
script:
- |
if [[ $TRAVIS_OS_NAME == "osx" ]]; then
${SH} -c shpec
elif [[ $TRAVIS_OS_NAME == "windows" ]]; then
# temporary workaround for: https://github.com/rylnd/shpec/pull/127
echo "" >> /usr/local/bin/shpec
echo shpec >> /usr/local/bin/shpec
${SH} -c /usr/local/bin/shpec
else
if [ -z "${SH}" ]; then
docker-compose run "${DIST}";
else
docker-compose run "${SH}_${DIST}";
fi
fi