forked from sulu/sulu-minimal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
49 lines (43 loc) · 1.17 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: false
dist: trusty
language: php
cache:
directories:
- "$HOME/.composer/cache/files"
matrix:
include:
- php: 5.5
env:
- COMPOSER_FLAGS="--prefer-dist --no-interaction"
- ENABLE_SWAP=true
- php: 7.1
env:
- COMPOSER_FLAGS="--prefer-dist --no-interaction"
before_install:
- composer self-update
- phpenv config-add tests/travis.php.ini
install:
- | # enable swap
if [[ $ENABLE_SWAP == 'true' ]]; then
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo sysctl vm.swappiness=10
fi
# Install dependencies
- travis_retry composer update $COMPOSER_FLAGS
- composer info -i
# Create database for build test
- bin/adminconsole doctrine:database:create
# Create database for unit test
- bin/adminconsole doctrine:database:create --env=test
script:
# Test if installation works
- bin/adminconsole sulu:build dev --no-interaction
# Lint Twig files
- bin/adminconsole lint:twig app/Resources/views
# Lint Yaml files
- bin/adminconsole lint:yaml app/config
# Test if PHPUnit installation works
- bin/simple-phpunit