This repository has been archived by the owner on Mar 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 129
/
.travis.yml
53 lines (46 loc) · 1.66 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
sudo: false
language: php
php:
- 5.5
- 5.6
- hhvm
# run build against hhvm but allow them to fail
# http://docs.travis-ci.com/user/build-configuration/#Rows-That-are-Allowed-To-Fail
matrix:
allow_failures:
- php: 5.5
- php: hhvm
env:
global:
- YII_ENV=test
- APP_PRETTY_URLS=1
- DB_PORT_3306_TCP_ADDR=localhost
- DB_ENV_MYSQL_DATABASE=p4_test
- DB_ENV_MYSQL_USER=test
- DB_ENV_MYSQL_PASSWORD=test123
install:
- git describe --long --tags --always > src/version
- npm install -g less
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- composer self-update && composer --version
- composer global require --prefer-dist "codeception/codeception:2.1.*" "codeception/specify:*" "codeception/verify:*" && composer global dumpautoload --optimize
- composer global require "fxp/composer-asset-plugin:1.1.*"
- cp .env-dist .env
- composer install --dev --prefer-dist
before_script:
- php yii
- ./yii
- mkdir -p tests/codeception/_output && chmod 777 tests/codeception/_output
- sed -i.bak 's/localhost:80/localhost:8080/' tests/codeception/acceptance.suite.yml
- php -S localhost:8080 -t web > /dev/null 2>&1 &
- mysql -e 'create database p4_test;'
- mysql -e "CREATE USER 'test'@'localhost' IDENTIFIED BY 'test123';"
- mysql -uroot -e "GRANT ALL PRIVILEGES ON * . * TO 'test'@'localhost';"
- php yii migrate --migrationLookup=@root/tests/codeception/_migrations --interactive=0
- php yii app/setup-admin-user --interactive=0
script:
- codecept -v run unit -g mandatory
- codecept -vv run functional -g mandatory
after_success:
- php yii app/setup-docs --interactive=0
- php yii app/generate-docs --interactive=0