server-configs-nginx/.travis.yml

41 lines
1.1 KiB
YAML
Raw Normal View History

2019-02-10 22:15:33 +01:00
# https://docs.travis-ci.com/
services:
- docker
addons:
hosts:
- server.localhost
- www-server.localhost
- www.server.localhost
- secure.server.localhost
- www.secure.server.localhost
apt:
packages:
- docker-ce
install:
2019-02-12 12:31:41 +01:00
- curl -sSL https://github.com/h5bp/server-configs-test/releases/download/0.0.7/server-configs-test.tar.gz | tar -xz -C test/
2019-02-10 22:15:33 +01:00
before_script:
- docker pull nginx
- |
docker run -d -p 80:80 -p 443:443 --name server \
-v $TRAVIS_BUILD_DIR/test/fixtures:/var/www/server.localhost \
-v $TRAVIS_BUILD_DIR/test/vhosts:/etc/nginx/conf.d \
-v $TRAVIS_BUILD_DIR/test/certs:/etc/nginx/certs \
-v $TRAVIS_BUILD_DIR/h5bp:/etc/nginx/h5bp \
-v $TRAVIS_BUILD_DIR/nginx.conf:/etc/nginx/nginx.conf \
-v $TRAVIS_BUILD_DIR/mime.types:/etc/nginx/mime.types \
nginx
script:
2019-02-12 12:31:41 +01:00
- ./test/bin/k6 run test/lib/index.js
- ./test/bin/k6 run test/lib/precompressed-files-gzip.js
2019-02-10 22:15:33 +01:00
2019-02-12 12:31:41 +01:00
after_success: ./test/bin/k6 run test/lib/benchmark.js
2019-02-10 22:15:33 +01:00
after_failure:
- docker ps -a
- docker logs server