forked from h5bp/server-configs-apache
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
56 lines (52 loc) · 1.74 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
46
47
48
49
50
51
52
53
54
55
56
# https://docs.travis-ci.com/
language: minimal
services:
- docker
addons:
hosts:
- server.localhost
- www-server.localhost
- www.server.localhost
- secure.server.localhost
- www.secure.server.localhost
apt:
packages:
- docker-ce
jobs:
include:
- name: "Server Config Tests"
install:
- curl -sSL https://github.com/h5bp/server-configs-test/releases/download/1.2.2/server-configs-test.tar.gz | tar -xz -C test/
- ./bin/build.sh test/fixtures/.htaccess test/build/htaccess_fixture.conf
before_script:
- docker pull httpd
- |
docker run -d -p 80:80 -p 443:443 --name server \
-v $TRAVIS_BUILD_DIR/test/fixtures:/usr/local/apache2/htdocs \
-v $TRAVIS_BUILD_DIR/test/vhosts/.htaccess.server.localhost.conf:/usr/local/apache2/conf/httpd.conf \
httpd
script: ./test/bin/k6 run test/lib/index.js -e TESTS=basic-file-access:cache-busting:custom-errors:forbidden-files:enforce-gzip:precompressed-files-gzip:concatenation
after_success: ./test/bin/k6 run test/lib/benchmark.js
after_failure:
- docker ps -a
- docker logs server
- name: "Build Tests"
language: node_js
node_js: node
script: ./test/build/test_userbuild.sh
before_deploy:
- ./bin/build.sh dist/.htaccess bin/htaccess.conf
- ./bin/build.sh dist/h5bp.htaccess bin/htaccess.conf
deploy:
- provider: releases
api_key: $GITHUB_API_TOKEN
file: dist/h5bp.htaccess
skip_cleanup: true
on:
tags: true
- provider: npm
email: $NPM_API_EMAIL
api_key: $NPM_API_TOKEN
skip_cleanup: true
on:
tags: true