forked from edusoho/edusoho
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
39 lines (33 loc) · 1.3 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
branches:
- master
- feature/x8
language: php
php:
- '5.4'
- '5.6'
- '7.0'
env:
- SYMFONY_VERSION="~2.8.12" DB=mysql
before_script:
- mysql -e 'CREATE DATABASE `edusoho_test` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci'
- mysql -u root -e "CREATE USER 'tester'@'localhost' IDENTIFIED BY 'tester'"
- mysql -u root -e "GRANT ALL PRIVILEGES ON *.* TO 'tester'@'localhost'"
- cp app/config/parameters.yml.dist app/config/parameters_test.yml
- cp app/config/parameters.yml.dist app/config/parameters.yml
- "sed -i 's/\\s*database_host.*/ database_host: 127.0.0.1/g' app/config/parameters_test.yml"
- "sed -i 's/\\s*database_name.*/ database_name: edusoho_test/g' app/config/parameters_test.yml"
- "sed -i 's/\\s*database_user.*/ database_user: tester/g' app/config/parameters_test.yml"
- "sed -i 's/\\s*database_password.*/ database_password: tester/g' app/config/parameters_test.yml"
- mkdir web/files
- mkdir -p app/data/private_files
- touch app/config/routing_plugins.yml
- touch app/data/crontab_config.yml
script:
- phpunit -c app/ --testsuite UnitA2B
- phpunit -c app/ --testsuite UnitC2D
- phpunit -c app/ --testsuite UnitE2P
- phpunit -c app/ --testsuite UnitQ2T
- phpunit -c app/ --testsuite UnitU2Z
cache:
directories:
- $HOME/.composer/cache