forked from webdevmatics/chatter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
85 lines (63 loc) · 2.2 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
language: php
sudo: true
php:
- 5.6
- 7.0
- 7.1
- hhvm
- nightly
matrix:
fast_finish: true
allow_failures:
- php: hhvm
- php: nightly
services:
- mysql
before_script:
# prevent MySQL went away error
- mysql -u root -e 'SET @@GLOBAL.wait_timeout=28800;'
# Create a new database and add all priveleges
- mysql -u root -e "create database IF NOT EXISTS chatter;"
# Current DIR
- pwd
# Move up one directory
- cd ../
# Create a New Laravel App
- composer create-project --prefer-dist laravel/laravel=5.3.* chatter-app
# CD into the new laravel app
- cd chatter-app
# Include Chatter Package & Markdown package
- composer require devdojo/chatter dev-master
- composer require graham-campbell/markdown
# Remove the current version
- rm -rf vendor/devdojo/chatter
# Move this build into the chatter folder
- mv /home/travis/build/thedevdojo/chatter /home/travis/build/thedevdojo/chatter-app/vendor/devdojo/chatter
# Move up one folder and rename chatter-app to chatter
- cd ../
- mv chatter-app chatter
- cd chatter
- composer dump-autoload
# Add the database credentials
- sed 's/DB_DATABASE=homestead/DB_DATABASE=chatter/g' .env > environment
- sed 's/DB_USERNAME=homestead/DB_USERNAME=root/g' environment > .env
- sed 's/DB_PASSWORD=secret/DB_PASSWORD=/g' .env > environment
- rm .env
- mv environment .env
# Add the service providers
- sed 's/App\\Providers\\RouteServiceProvider\:\:class,/App\\Providers\\RouteServiceProvider\:\:class, Webdevmatics\\Chatter\\ChatterServiceProvider\:\:class,/g' config/app.php > config/app-temp.php
- rm config/app.php
- mv config/app-temp.php config/app.php
# Temponary fix for testing with another charset
- php -r "file_put_contents('config/database.php', str_replace('utf8mb4', 'utf8', file_get_contents('config/database.php')));"
# Install chatter
- php artisan make:auth
- php artisan vendor:publish
- composer dump-autoload
- php artisan migrate --verbose
- php artisan db:seed --class=ChatterTableSeeder
# Remove the default phpunit.xml and replace it with chatter phpunit.xml
- rm phpunit.xml
- cp vendor/devdojo/chatter/phpunit.xml phpunit.xml
script:
# - vendor/bin/phpunit