Dan Brown

Fixed export testing and updated travis settings

1 dist: trusty 1 dist: trusty
2 -sudo: required 2 +sudo: false
3 language: php 3 language: php
4 php: 4 php:
5 - 7.0 5 - 7.0
...@@ -8,15 +8,11 @@ cache: ...@@ -8,15 +8,11 @@ cache:
8 directories: 8 directories:
9 - $HOME/.composer/cache 9 - $HOME/.composer/cache
10 10
11 -addons:
12 - apt:
13 - packages:
14 - - mysql-server-5.6
15 - - mysql-client-core-5.6
16 - - mysql-client-5.6
17 -
18 before_script: 11 before_script:
19 - mysql -u root -e 'create database `bookstack-test`;' 12 - mysql -u root -e 'create database `bookstack-test`;'
13 + - mysql -u root -e "CREATE USER 'bookstack-test'@'localhost' IDENTIFIED BY 'bookstack-test';"
14 + - mysql -u root -e "GRANT ALL ON \`bookstack-test\`.* TO 'bookstack-test'@'localhost';"
15 + - mysql -u root -e "FLUSH PRIVILEGES;"
20 - phpenv config-rm xdebug.ini 16 - phpenv config-rm xdebug.ini
21 - composer dump-autoload --no-interaction 17 - composer dump-autoload --no-interaction
22 - composer install --prefer-dist --no-interaction 18 - composer install --prefer-dist --no-interaction
...@@ -25,5 +21,8 @@ before_script: ...@@ -25,5 +21,8 @@ before_script:
25 - php artisan migrate --force -n --database=mysql_testing 21 - php artisan migrate --force -n --database=mysql_testing
26 - php artisan db:seed --force -n --class=DummyContentSeeder --database=mysql_testing 22 - php artisan db:seed --force -n --class=DummyContentSeeder --database=mysql_testing
27 23
24 +after_failure:
25 + - cat storage/logs/laravel.log
26 +
28 script: 27 script:
29 - phpunit 28 - phpunit
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -82,7 +82,7 @@ return [ ...@@ -82,7 +82,7 @@ return [
82 82
83 'mysql_testing' => [ 83 'mysql_testing' => [
84 'driver' => 'mysql', 84 'driver' => 'mysql',
85 - 'host' => 'localhost', 85 + 'host' => '127.0.0.1',
86 'database' => 'bookstack-test', 86 'database' => 'bookstack-test',
87 'username' => env('MYSQL_USER', 'bookstack-test'), 87 'username' => env('MYSQL_USER', 'bookstack-test'),
88 'password' => env('MYSQL_PASSWORD', 'bookstack-test'), 88 'password' => env('MYSQL_PASSWORD', 'bookstack-test'),
......
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
5 <title>{{ $book->name }}</title> 5 <title>{{ $book->name }}</title>
6 6
7 <style> 7 <style>
8 + @if (!app()->environment('testing'))
8 {!! file_get_contents(public_path('/css/export-styles.css')) !!} 9 {!! file_get_contents(public_path('/css/export-styles.css')) !!}
10 + @endif
9 .page-break { 11 .page-break {
10 page-break-after: always; 12 page-break-after: always;
11 } 13 }
......
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
5 <title>{{ $chapter->name }}</title> 5 <title>{{ $chapter->name }}</title>
6 6
7 <style> 7 <style>
8 + @if (!app()->environment('testing'))
8 {!! file_get_contents(public_path('/css/export-styles.css')) !!} 9 {!! file_get_contents(public_path('/css/export-styles.css')) !!}
10 + @endif
9 .page-break { 11 .page-break {
10 page-break-after: always; 12 page-break-after: always;
11 } 13 }
......
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
5 <title>{{ $page->name }}</title> 5 <title>{{ $page->name }}</title>
6 6
7 <style> 7 <style>
8 + @if (!app()->environment('testing'))
8 {!! file_get_contents(public_path('/css/export-styles.css')) !!} 9 {!! file_get_contents(public_path('/css/export-styles.css')) !!}
10 + @endif
9 </style> 11 </style>
10 @yield('head') 12 @yield('head')
11 </head> 13 </head>
......