|
1 |
| -# For more information about the configurations used |
2 |
| -# in this file, please see the Travis CI documentation: |
3 | 1 | # https://docs.travis-ci.com/
|
4 | 2 |
|
5 |
| -language: node_js |
6 |
| -node_js: node |
7 |
| -sudo: required |
| 3 | +language: minimal |
8 | 4 |
|
9 |
| -env: |
10 |
| - global: |
11 |
| - - secure: "itatOgspOE49LX1fczgut51/3AGiCE7ueMeUHdGseB7cWfyFlJ2eUozspXBfbmWtEls8Y97/V1Q8vZty/WXJ2Q3CdxjK8TBBhVycRgK5Qp03eG/yFy/G5hXN1mGil4KwIwqHVYAQvCVcuDv0Ek4V+PEfNp8KGkRILxP2a6kRjgw=" |
12 |
| - |
13 |
| -jobs: |
14 |
| - include: |
15 |
| - - env: # Tests for Apache 2.4.x |
16 |
| - - APACHE_VERSION="2.4" |
17 |
| - - CONF_TARGET="000-default.conf" |
18 |
| - before_script: ./bin/setup.sh |
19 |
| - |
20 |
| - - stage: distribution |
21 |
| - if: branch = master |
22 |
| - script: .travis/update-dist.sh |
23 |
| - |
24 |
| - fast_finish: true |
25 |
| - allow_failures: |
26 |
| - - stage: distribution |
27 |
| - |
28 |
| -after_failure: |
29 |
| - - sudo cat /var/log/apache2/error.log |
30 |
| - - sudo cat /var/log/apache2/access.log |
| 5 | +services: |
| 6 | + - docker |
31 | 7 |
|
32 | 8 | addons:
|
33 | 9 | hosts:
|
34 |
| - - travis.localhost |
| 10 | + - server.localhost |
| 11 | + - www-server.localhost |
| 12 | + - www.server.localhost |
| 13 | + - secure.server.localhost |
| 14 | + - www.secure.server.localhost |
| 15 | + apt: |
| 16 | + packages: |
| 17 | + - docker-ce |
| 18 | + |
| 19 | +install: |
| 20 | + - curl -sSL https://github.com/h5bp/server-configs-test/releases/download/1.0.1/server-configs-test.tar.gz | tar -xz -C test/ |
| 21 | + |
| 22 | +before_script: |
| 23 | + - bash -c "./bin/build.sh test/fixtures/.htaccess test/build/htaccess_fixture.conf" |
| 24 | + - docker pull httpd |
| 25 | + - | |
| 26 | + docker run -d -p 80:80 -p 443:443 --name server \ |
| 27 | + -v $TRAVIS_BUILD_DIR/test/fixtures:/usr/local/apache2/htdocs \ |
| 28 | + -v $TRAVIS_BUILD_DIR/test/vhosts/httpd.conf:/usr/local/apache2/conf/httpd.conf \ |
| 29 | + httpd |
| 30 | +
|
| 31 | +script: |
| 32 | + - ./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 |
| 33 | + - bash -c "./test/build/test_userbuild.sh" |
| 34 | + |
| 35 | +after_success: ./test/bin/k6 run test/lib/benchmark.js |
35 | 36 |
|
36 |
| -cache: |
37 |
| - directories: node_modules |
| 37 | +after_failure: |
| 38 | + - docker ps -a |
| 39 | + - docker logs server |
| 40 | + |
| 41 | +before_deploy: bash -c "bin/build.sh dist/.htaccess htaccess.conf" |
| 42 | + |
| 43 | +deploy: |
| 44 | + - provider: releases |
| 45 | + api_key: $GITHUB_API_TOKEN |
| 46 | + file: dist/.htaccess |
| 47 | + skip_cleanup: true |
| 48 | + on: |
| 49 | + tags: true |
| 50 | + - provider: npm |
| 51 | + email: $NPM_API_EMAIL |
| 52 | + api_key: $NPM_API_TOKEN |
| 53 | + skip_cleanup: true |
| 54 | + on: |
| 55 | + tags: true |
0 commit comments