forked from edusoho/edusoho
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
75 lines (69 loc) · 2.21 KB
/
.gitlab-ci.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
stages:
- test
variables:
MYSQL_DATABASE: edusoho_test
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
before_script:
- cp app/config/parameters.yml.dist app/config/parameters.yml
- cp app/config/parameters.yml.dist app/config/parameters_test.yml
- "sed -i 's/\\s*database_host.*/ database_host: mysql/g' app/config/parameters_test.yml"
- "sed -i 's/\\s*database_name.*/ database_name: edusoho_test/g' app/config/parameters_test.yml"
- "echo ' redis_host: [redis:6379]' >> app/config/parameters_test.yml"
- "echo ' redis_timeout: 1' >> app/config/parameters_test.yml"
- "echo ' redis_reserved: null' >> app/config/parameters_test.yml"
- "echo ' redis_retry_interval: 100' >> app/config/parameters_test.yml"
- mkdir web/files
- mkdir -p app/data/private_files
- touch app/config/routing_plugins.yml
Unit Test With PHP 5.3:
stage: test
image: codeages/ci-php:5.3-2
services:
- mysql:5.5
- redis:latest
script:
- phpunit -c app/
only:
- tags
- develop
- master
- trigger
Unit Test With PHP 5.5:
stage: test
image: codeages/ci-php:5.5-5
services:
- mysql:5.5
- redis:latest
script:
- php-cs-fixer fix --config=.php_cs.dist -v --dry-run --using-cache=no --path-mode=intersection `git diff --name-only --diff-filter=ACMRTUXB HEAD~..HEAD`
- phpunit -c app/
Unit Test With PHP 7.0:
stage: test
image: codeages/ci-php:7.0-7
services:
- mysql:5.5
- redis:latest
script:
- sed -i 's/memory_limit.*/memory_limit = 2048M/g' /etc/php/7.0/phpdbg/php.ini
- cat /etc/php/7.0/phpdbg/php.ini | grep memory_limit
- phpdbg -qrr /usr/bin/phpunit -c app/ --coverage-text --colors=never
only:
- tags
- develop
- master
- trigger
#Functional Test With 5.5:
# stage: test
# image: codeages/ci-php:5.5-5
# services:
# - mysql:5.5
# - redis:latest
# - selenium/standalone-chrome:latest
# script:
# - php-cs-fixer fix --config=.php_cs.dist -v --dry-run --using-cache=no --path-mode=intersection `git diff --name-only --diff-filter=ACMRTUXB HEAD~..HEAD`
# - SELENIUM_SERVER_URL="http://selenium__standalone-chrome:4444/wd/hub" phpunit -c tests/Functional
# only:
# - tags
# - develop
# - master
# - trigger