forked from nbs-system/naxsi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
33 lines (26 loc) · 1.39 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
language: perl
perl: 5.20
env:
- VER_NGINX=1.9.1
before_install:
- sudo apt-get update -qq
install:
- sudo apt-get install lcov
- sudo pip install codecov
- sudo mkdir -p /etc/nginx/
- sudo cp naxsi_config/naxsi_core.rules /etc/nginx/
- wget "http://nginx.org/download/nginx-${VER_NGINX}.tar.gz" && tar -xf "nginx-${VER_NGINX}.tar.gz"
- cd "nginx-${VER_NGINX}"
- ./configure --with-cc-opt="--coverage" --with-ld-opt="-lgcov" --conf-path=/tmp/naxsi_ut/nginx.conf --add-module=../naxsi_src/ --error-log-path=/tmp/naxsi_ut/error.log --http-client-body-temp-path=/tmp/naxsi_ut/body/ --http-fastcgi-temp-path=/tmp/naxsi_ut/fastcgi/ --http-log-path=/tmp/naxsi_ut/access.log --http-proxy-temp-path=/tmp/naxsi_ut/proxy/ --lock-path=/tmpnginx.lock --pid-path=/tmp/naxsi_ut/nginx.pid --with-http_ssl_module --without-mail_pop3_module --without-mail_smtp_module --without-mail_imap_module --without-http_uwsgi_module --without-http_scgi_module --with-ipv6 --prefix=/tmp
- make install
- export PATH=$PATH":/tmp/sbin/"
- cd ../naxsi_src
- make deploy
- cpanm -v --notest Test::Nginx
before_script:
- lcov --directory "../nginx-${VER_NGINX}" --zerocounters
script: make test
after_success:
- lcov --directory "../nginx-${VER_NGINX}/objs/addon/naxsi_src/" --capture --output-file naxsi.lcov --base-directory "../nginx-${VER_NGINX}/"
- lcov --list naxsi.lcov
- bash <(curl -s https://codecov.io/bash)