forked from yiisoft/yii2-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
67 lines (58 loc) · 2.85 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
language: bash
services: docker
env:
- PHP_BASE_IMAGE_VERSION=5.6-fpm DOCKERFILE_FLAVOUR=debian X_LEGACY_GD_LIB=1
- PHP_BASE_IMAGE_VERSION=7.0-fpm DOCKERFILE_FLAVOUR=debian X_LEGACY_GD_LIB=1
- PHP_BASE_IMAGE_VERSION=7.1-fpm DOCKERFILE_FLAVOUR=debian X_LEGACY_GD_LIB=1
- PHP_BASE_IMAGE_VERSION=7.2-fpm DOCKERFILE_FLAVOUR=debian X_LEGACY_GD_LIB=1
- PHP_BASE_IMAGE_VERSION=7.3-fpm DOCKERFILE_FLAVOUR=debian X_LEGACY_GD_LIB=1
- PHP_BASE_IMAGE_VERSION=7.4-fpm DOCKERFILE_FLAVOUR=debian
- PHP_BASE_IMAGE_VERSION=5.6-apache DOCKERFILE_FLAVOUR=debian X_LEGACY_GD_LIB=1
- PHP_BASE_IMAGE_VERSION=7.0-apache DOCKERFILE_FLAVOUR=debian X_LEGACY_GD_LIB=1
- PHP_BASE_IMAGE_VERSION=7.1-apache DOCKERFILE_FLAVOUR=debian X_LEGACY_GD_LIB=1
- PHP_BASE_IMAGE_VERSION=7.2-apache DOCKERFILE_FLAVOUR=debian X_LEGACY_GD_LIB=1
- PHP_BASE_IMAGE_VERSION=7.3-apache DOCKERFILE_FLAVOUR=debian X_LEGACY_GD_LIB=1
- PHP_BASE_IMAGE_VERSION=7.4-apache
matrix:
allow_failures:
# Deprecated PHP versions
- env: PHP_BASE_IMAGE_VERSION=5.6-fpm DOCKERFILE_FLAVOUR=debian X_LEGACY_GD_LIB=1
- env: PHP_BASE_IMAGE_VERSION=7.0-fpm DOCKERFILE_FLAVOUR=debian X_LEGACY_GD_LIB=1
- env: PHP_BASE_IMAGE_VERSION=5.6-apache DOCKERFILE_FLAVOUR=debian X_LEGACY_GD_LIB=1
- env: PHP_BASE_IMAGE_VERSION=7.0-apache DOCKERFILE_FLAVOUR=debian X_LEGACY_GD_LIB=1
before_install:
- export TEST_YII_VERSION=a777c2e8f69dc753f8a945b1dd54bbaaa1e9e66c
- export DOCKER_COMPOSE_VERSION=1.16.1
- export PHP_IMAGE_NAME=yiisoftware/yii2-php
- if [ -n "$TRAVIS_TAG" ]; then export PHP_IMAGE_VERSION_SUFFIX=-${TRAVIS_TAG}; fi
- sudo apt-get update
- sudo apt-get install docker-ce
- 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
install:
- git clone https://github.com/yiisoft/yii2 _host-volumes/yii2
- pushd _host-volumes/yii2 && git checkout ${TEST_YII_VERSION} && popd
- cp .env-dist .env
before_script:
- pwd
- docker version
- docker info
- docker-compose version
script:
- echo "travis_fold:start:BUILD folding starts"
- docker-compose build --build-arg X_LEGACY_GD_LIB=$X_LEGACY_GD_LIB
- echo "travis_fold:end:BUILD folding ends"
- docker-compose run --rm php php -v
- docker-compose run --rm php php /tests/requirements.php
- docker-compose run --rm -w /yii2 php composer install --prefer-dist
- docker-compose run --rm -w /yii2 php php -d error_reporting="E_ALL ^ E_DEPRECATED" vendor/bin/phpunit tests/framework/ --exclude db
after_script:
- docker images
after_success:
- if [[ $TRAVIS_BRANCH = "master" || -n "$TRAVIS_TAG" ]]; then
echo $DOCKERHUB_PASS | docker login -u $DOCKERHUB_USER --password-stdin &&
docker-compose push;
fi
# vim:set et ts=2 sw=2: