-
Notifications
You must be signed in to change notification settings - Fork 39
/
.travis.yml
61 lines (44 loc) · 1.4 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
language: php
sudo: true
php:
- 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.8.* chatter-app
# CD into the new laravel app
- cd chatter-app
# Include Chatter Package & Markdown package
- composer require "chatter-laravel/core:^5.8"
- 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
# 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 preset chatter -q -n
# Remove the default phpunit.xml and replace it with chatter phpunit.xml
- rm phpunit.xml
- cp vendor/chatter-laravel/core/phpunit.xml phpunit.xml
script:
- vendor/bin/phpunit