-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
49 lines (41 loc) · 1.46 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
sudo: required
services:
- docker
addons:
apt:
packages:
- docker-ce
before_install:
- curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash -s -- --version v2.9.0
install: true
before_script:
- sudo service postgresql stop
# wait for postgresql to shutdown
- while sudo lsof -Pi :5432 -sTCP:LISTEN -t; do sleep 1; done
script:
- if jq '.extra.symfony.id != null' api/composer.json -e > /dev/null; then echo 'composer.json must not have symfony.id' 1>&2 && false; fi
- docker-compose pull --ignore-pull-failures
- docker-compose build --pull
- docker-compose run --no-deps -T php composer validate --no-check-publish
- docker-compose up -d
- sleep 30
- docker-compose exec -T php composer req sensiolabs/security-checker
- docker-compose exec -T php bin/console security:check
- curl http://localhost # Client
- curl http://localhost:81 # Admin
- curl http://localhost:8080 # API
- curl http://localhost:8081 # Varnish
- curl -k https://localhost # Client (HTTP/2)
- curl -k https://localhost:444 # Admin (HTTP/2)
- curl -k https://localhost:8443 # API (HTTP/2)
- curl -k https://localhost:8444 # Varnish (HTTP/2)
- helm lint ./api/helm/api/
before_deploy:
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin "$DOCKER_REGISTRY"
deploy:
provider: script
script: docker-compose push
skip_cleanup: true
on:
repo: api-platform/api-platform
branch: master