-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
17 lines (15 loc) · 1.3 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
sudo: required
services:
- docker
script:
- docker-compose build
- docker-compose up -d
- sleep 30
# - docker-compose exec app bin/console security:check
# - docker-compose exec app bin/console doctrine:schema:create
- 'docker-compose exec app curl -X BAN "http://varnish/" --silent -H "ApiPlatform-Ban-Regex: (^|\,)/foos($|\,)" > /dev/null'
- 'firstCall=`curl -X GET "http://localhost/foos" --silent -H "accept: application/ld+json" -I | grep -Fi "ApiPlatform-Cache-Hits: 0"`; if [ -z "$firstCall" ]; then echo First call must be MISS; exit 1; fi'
- 'secondCall=`curl -X GET "http://localhost/foos" --silent -H "accept: application/ld+json" -I | grep -Fi "ApiPlatform-Cache-Hits: 1"`; if [ -z "$secondCall" ]; then echo Second call must be HIT 1; exit 1; fi'
- 'thirdCall=`curl -X GET "http://localhost/foos" --silent -H "accept: application/ld+json" -I | grep -Fi "ApiPlatform-Cache-Hits: 2"`; if [ -z "$thirdCall" ]; then echo Third call must be HIT 2; exit 1; fi'
- 'docker-compose exec app curl -X BAN "http://varnish/" --silent -H "ApiPlatform-Ban-Regex: (^|\,)/foos($|\,)" > /dev/null'
- 'newCall=`curl -X GET "http://localhost/foos" --silent -H "accept: application/ld+json" -I | grep -Fi "ApiPlatform-Cache-Hits: 0"`; if [ -z "$newCall" ]; then echo New call after BAN must be MISS; exit 1; fi'