forked from yiisoft/yii2-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
79 lines (70 loc) · 3.43 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
68
69
70
71
72
73
74
75
76
77
78
79
language: bash
services: docker
env:
- DOCKERFILE_FLAVOUR=alpine PHP_BASE_IMAGE_VERSION=5.6-fpm-alpine
- DOCKERFILE_FLAVOUR=alpine PHP_BASE_IMAGE_VERSION=7.0-fpm-alpine
- DOCKERFILE_FLAVOUR=alpine PHP_BASE_IMAGE_VERSION=7.1-fpm-alpine
- DOCKERFILE_FLAVOUR=alpine PHP_BASE_IMAGE_VERSION=7.2-fpm-alpine
- DOCKERFILE_FLAVOUR=debian PHP_BASE_IMAGE_VERSION=5.6-fpm
- DOCKERFILE_FLAVOUR=debian PHP_BASE_IMAGE_VERSION=7.0-fpm
- DOCKERFILE_FLAVOUR=debian PHP_BASE_IMAGE_VERSION=7.1-fpm
- DOCKERFILE_FLAVOUR=debian PHP_BASE_IMAGE_VERSION=7.2-fpm
- DOCKERFILE_FLAVOUR=debian PHP_BASE_IMAGE_VERSION=7.3-fpm
- DOCKERFILE_FLAVOUR=debian PHP_BASE_IMAGE_VERSION=7.4-rc-fpm
- DOCKERFILE_FLAVOUR=debian PHP_BASE_IMAGE_VERSION=5.6-apache
- DOCKERFILE_FLAVOUR=debian PHP_BASE_IMAGE_VERSION=7.0-apache
- DOCKERFILE_FLAVOUR=debian PHP_BASE_IMAGE_VERSION=7.1-apache
- DOCKERFILE_FLAVOUR=debian PHP_BASE_IMAGE_VERSION=7.2-apache
- DOCKERFILE_FLAVOUR=debian PHP_BASE_IMAGE_VERSION=7.3-apache
- DOCKERFILE_FLAVOUR=debian PHP_BASE_IMAGE_VERSION=7.4-rc-apache
matrix:
allow_failures:
# Not supported PHP versions (Alpine 5.6-7.1 have a broken ImageMagick installation, 7.2 does not pass all framework tests)
- env: DOCKERFILE_FLAVOUR=alpine PHP_BASE_IMAGE_VERSION=5.6-fpm-alpine
- env: DOCKERFILE_FLAVOUR=alpine PHP_BASE_IMAGE_VERSION=7.0-fpm-alpine
- env: DOCKERFILE_FLAVOUR=alpine PHP_BASE_IMAGE_VERSION=7.1-fpm-alpine
- env: DOCKERFILE_FLAVOUR=alpine PHP_BASE_IMAGE_VERSION=7.2-fpm-alpine
# Deprecated PHP versions
- env: DOCKERFILE_FLAVOUR=debian PHP_BASE_IMAGE_VERSION=5.6-fpm
- env: DOCKERFILE_FLAVOUR=debian PHP_BASE_IMAGE_VERSION=7.0-fpm
- env: DOCKERFILE_FLAVOUR=debian PHP_BASE_IMAGE_VERSION=5.6-apache
- env: DOCKERFILE_FLAVOUR=debian PHP_BASE_IMAGE_VERSION=7.0-apache
# Non-stable PHP versions
- env: DOCKERFILE_FLAVOUR=debian PHP_BASE_IMAGE_VERSION=7.4-rc-fpm
- env: DOCKERFILE_FLAVOUR=debian PHP_BASE_IMAGE_VERSION=7.4-rc-apache
before_install:
- export TEST_YII_VERSION=6b0be47e0fa9c532e03b07b4369050582fcf5c7a
- 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
- 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
- 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: