Skip to content
This repository was archived by the owner on Mar 9, 2021. It is now read-only.

Commit 736b138

Browse files
committed
Add travis-ci tests for windows and osx os
1 parent 89dab7b commit 736b138

File tree

2 files changed

+41
-6
lines changed

2 files changed

+41
-6
lines changed

.travis.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
os:
2+
- osx
23
- linux
4+
- windows
35

46
language: php
57

@@ -12,12 +14,7 @@ php:
1214
- 7.1
1315

1416
before_install:
15-
- "phantomjs --version"
16-
- "if [ $(phantomjs --version) != '2.1.1' ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi"
17-
- "if [ $(phantomjs --version) != '2.1.1' ]; then wget https://assets.membergetmember.co/software/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2; fi"
18-
- "if [ $(phantomjs --version) != '2.1.1' ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi"
19-
- "export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH"
20-
- "phantomjs --version"
17+
- sh .travis/install.sh
2118

2219
install:
2320
- travis_retry composer self-update

.travis/install.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
3+
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
4+
5+
# Install some custom requirements on OS X
6+
brew update
7+
8+
brew install phantomjs
9+
10+
phantomjs --version
11+
12+
elif [[ $TRAVIS_OS_NAME == 'linux' ]]; then
13+
14+
# Install some custom requirements on Linux
15+
if [ $(phantomjs --version) != '2.1.1' ]; then
16+
17+
rm -rf $PWD/travis_phantomjs;
18+
mkdir -p $PWD/travis_phantomjs;
19+
fi
20+
21+
if [ $(phantomjs --version) != '2.1.1' ]; then
22+
23+
wget https://assets.membergetmember.co/software/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2;
24+
fi
25+
26+
if [ $(phantomjs --version) != '2.1.1' ]; then
27+
28+
tar -xvf $PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs;
29+
fi
30+
31+
export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH
32+
33+
phantomjs --version
34+
35+
elif [[ $TRAVIS_OS_NAME == 'windows' ]]; then
36+
37+
echo "Ok dude! :||||"
38+
fi

0 commit comments

Comments
 (0)