-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
35 lines (32 loc) · 2.1 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
sudo: required
env:
global:
- API_ENV=test
- API_SECRET=byzxl36nl289x6yu71hdie2euf19vm3r
- API_JWT_PASS_PHRASE=00ix4gk15tgvh6hl7z8nlj0r2xvlxczj
- API_ENCRYPTION=def00000b66cdea17be03154351b285554884f1cba050541781f535bce839d31e315a82771d5dc5c32a8634ba1d7831ce5f1ec0a29e4a17344216eb038745acd63d3149f
- API_SYSTEM_USERNAME=system
- API_SYSTEM_PASSWORD=system
matrix:
- DOCKER_VERSION=18.06.3~ce~3-0~ubuntu DOCKER_COMPOSE_VERSION=1.22.0
- DOCKER_VERSION=18.06.2~ce~3-0~ubuntu DOCKER_COMPOSE_VERSION=1.22.0
- DOCKER_VERSION=18.06.1~ce~3-0~ubuntu DOCKER_COMPOSE_VERSION=1.22.0
before_install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- apt-cache madison docker-ce
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce=${DOCKER_VERSION}
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- openssl genrsa -out api/config/jwt/key -aes256 -passout pass:${API_JWT_PASS_PHRASE} 4096
- openssl rsa -pubout -in api/config/jwt/key -out api/config/jwt/key.pub -passin pass:${API_JWT_PASS_PHRASE}
script:
- docker-compose -f docker-compose.yml -f docker-compose.test.yml up -d
- while true; do output=`docker-compose exec -T php pidof php-fpm | cat`; if [[ ! -z "${output}" ]]; then break; fi; sleep 1; done;
- docker-compose -f docker-compose.yml -f docker-compose.test.yml exec php php bin/console security:check
- docker-compose -f docker-compose.yml -f docker-compose.test.yml exec php php bin/console doctrine:migration:migrate --no-interaction
- docker-compose -f docker-compose.yml -f docker-compose.test.yml exec -e FIXTURES=test php php bin/console doctrine:fixtures:load --no-interaction
- docker-compose -f docker-compose.yml -f docker-compose.test.yml exec php vendor/bin/behat