forked from mitchellkrogza/nginx-ultimate-bad-bot-blocker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
44 lines (36 loc) · 1.35 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
language: php
env:
- WEB_PORT_80_TCP_ADDR=localhost
php:
- 5.4
- 5.5
- 5.6
- 7.0
#- hhvm
#sudo: false
matrix:
fast_finish: true
allow_failures:
- php: hhvm
cache:
- apt
addons:
apt:
packages:
- realpath
install:
- sudo add-apt-repository -y ppa:nginx/stable
- sudo apt-get update
- sudo apt-get install -y --force-yes nginx-extras
- travis/install-nginx.sh
script:
- sudo nginx -t &> /dev/stdout
- curl -vsf 'http://localhost:8080/nginx.php' &> /dev/stdout
- curl -A "googlebot" http://localhost:8080/nginx.php &> /dev/stdout
- curl -A "bingbot" http://localhost:8080/nginx.php &> /dev/stdout
- curl -I http://localhost:8080/nginx.php -e http://google.com
- STATUSCODE=$(curl -A "80legs" http://localhost:8080/nginx.php &> /dev/stderr --write-out "%{http_code}") | if test $STATUSCODE 52; then exit 0; fi
- STATUSCODE=$(curl -A "masscan" http://localhost:8080/nginx.php &> /dev/stderr --write-out "%{http_code}") | if test $STATUSCODE 52; then exit 0; fi
- STATUSCODE=$(curl -I http://localhost:8080/nginx.php -e http://100dollars-seo.com &> /dev/stderr --write-out "%{http_code}") | if test $STATUSCODE 52; then exit 0; fi
- STATUSCODE=$(curl -I http://localhost:8080/nginx.php -e http://zyzzcentral.ru &> /dev/stderr --write-out "%{http_code}") | if test $STATUSCODE 52; then exit 0; fi
- cat /tmp/error.log