-
Notifications
You must be signed in to change notification settings - Fork 33
/
.travis.yml
46 lines (34 loc) · 1.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
language: php
addons:
sauce_connect: true
php:
- '7.1'
install:
# Download ngrok
- curl -sO https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
- unzip $PWD/ngrok-stable-linux-amd64.zip
- chmod +x $PWD/ngrok
# Download json parser for determining ngrok tunnel
- curl -sO http://stedolan.github.io/jq/download/linux64/jq
- chmod +x $PWD/jq
# Setup project requirements
- composer install
- composer dump -o
cache:
directories:
- $HOME/.composer/cache
before_script:
- php artisan serve > /dev/null &
# Open ngrok tunnel
- $PWD/ngrok authtoken $NGROK_TOKEN
- $PWD/ngrok http 8000 > /dev/null &
# sleep to allow ngrok to initialize
- sleep 2
# extract the ngrok url and put it into testing.env file
- echo "APP_URL=$(curl -s localhost:4040/api/tunnels/command_line | jq --raw-output .public_url)" > testing.env
script: >
vendor/bin/steward run testing chrome -vv
--server-url="http://$SAUCE_USERNAME:[email protected]/wd/hub"
--capability="browserName:chrome"
--capability="platform:Windows 8.1"
--capability="chromedriverVersion:'2.35'"