-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
51 lines (43 loc) · 1.07 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
sudo: required
language: php
php:
- 7.3.9
services:
- docker
addons:
chrome: stable
before_install:
- nvm install 12.10.0
- node -v
- npm -v
before_script:
- cp .env-dist .env
- export $(cat .env | sed -e /^$/d -e /^#/d | xargs)
- env
- docker-compose up -d --build
- docker ps -a
- MYSQL_PORT=3308 && MYSQL_HOST=127.0.0.1
- while [[ "$(curl -o /dev/null -Isw '%{http_code}\n' http://localhost/api/health-check)" -ne 200 ]]; do sleep 3; echo "Waiting API to be available..."; done
- while ! docker exec mysql mysql -u"$MYSQL_USERNAME" -p"$MYSQL_PASSWORD" -e "select 1" > /dev/null 2>&1; do sleep 3; echo "Waiting MYSQL to be available..."; done
- docker logs api
- cd api
- composer install
- cd ..
- cd web
- npm install
- cd ..
script:
- cd api
- composer run sniff
- composer run test:unit
- composer run test:functional
- cd ..
- cd web
- npm run lint
- npm run test
# - npm run e2e # Temporary disable as travis not supporting latest chrome
- cd ..
after_script:
- docker-compose down -v
notifications:
email: false