forked from magento/magento-cloud-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
95 lines (86 loc) · 3.05 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
os: linux
dist: bionic
git:
depth: false
addons:
hosts:
- magento2.docker
- magento2.test
services:
- docker
language: php
stages:
- static-unit
- integration
- build-images
- test
jobs:
include:
- stage: static-unit
php: '7.1'
script: ./tests/travis/static-unit.sh;
env:
- TEST_SUITE=static-unit
- script: ./tests/travis/static-unit.sh;
php: '7.2'
env:
- TEST_SUITE=static-unit
- script: ./tests/travis/static-unit.sh;
php: '7.3'
env:
- TEST_SUITE=static-unit
- stage: integration
script: ./vendor/bin/phpunit --configuration ./tests/integration;
php: '7.1'
env:
- TEST_SUITE=integration
- script: ./vendor/bin/phpunit --configuration ./tests/integration;
php: '7.2'
env:
- TEST_SUITE=integration
- script: ./vendor/bin/phpunit --configuration ./tests/integration;
php: '7.3'
env:
- TEST_SUITE=integration
- stage: build-images
env:
- TEST_SUITE=build-images
script:
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then ./tests/travis/images.sh tls; fi;
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then ./tests/travis/images.sh varnish; fi;
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then ./tests/travis/images.sh elasticsearch; fi;
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then ./tests/travis/images.sh nginx; fi;
- script:
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then ./tests/travis/images.sh php 7.1-cli; fi;
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then ./tests/travis/images.sh php 7.1-fpm; fi;
env:
- TEST_SUITE=build-images
- script:
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then ./tests/travis/images.sh php 7.2-cli; fi;
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then ./tests/travis/images.sh php 7.2-fpm; fi;
env:
- TEST_SUITE=build-images
- script:
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then ./tests/travis/images.sh php 7.3-cli; fi;
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then ./tests/travis/images.sh php 7.3-fpm; fi;
env:
- TEST_SUITE=build-images
- stage: test
php: '7.1'
dist: xenial
env:
- TEST_SUITE=functional
- php: '7.2'
dist: xenial
env:
- TEST_SUITE=functional
- php: '7.3'
env:
- TEST_SUITE=functional
install: if [[ $TEST_SUITE != "build-images" ]]; then composer update; fi;
before_script:
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ] && [ $TEST_SUITE == "build-images" ]; then echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin; fi;
- if [ $TEST_SUITE == "functional" ]; then sudo sysctl -w vm.max_map_count=262144; fi;
- if [ $TEST_SUITE == "functional" ]; then cp codeception.dist.yml codeception.yml && sed -i "s/use_generated_images:\ false/use_generated_images:\ true/" codeception.yml; fi;
script:
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ] && [ $TEST_SUITE == "functional" ]; then ./tests/travis/functional.sh; fi;