chilio / laravel-dusk-ci

Docker Test suite for Laravel Dusk in gitlab CI
MIT License
159 stars 51 forks source link

migrate:fresh breaks laravel 5.4 #39

Closed jopapo closed 5 years ago

jopapo commented 5 years ago

I have an app with laravel 5.4 e I'm using this ci docker image.

The only thing I had to change to work is, instead of using the command configure-laravel was to rewrite its contents changing php artisan migrate:fresh --seed to: php artisan migrate:refresh --seed

A check on the laravel version prior to execute this command would make it retrocompatible too.

jopapo commented 5 years ago

Laravel 5.4 and 5.7 works!

Laravel 5.4 CI output:

$ configure-laravel
Application key [base64:xxx=] set successfully.
The [public/storage] directory has been linked.
Laravel Framework 5.4.36
Migration table not found.
Migration table created successfully.
Migrating: 2017_06_12_161322_create_tables
Migrated:  2017_06_12_161322_create_tables
Migrating: n
Migrated:  n
Seeding: TestDatabase
System Chrome version: 72
System Chromedriver version: 2.45
Laravel Chromedriver version: 2.28
Chromedriver shipped with your Laravel installation is NOT compatible with this systems chrome version!
Don't worry, we are fixing this right now, so you will be able, to test your app anyway.
You can always read more about running tests with system inbuilt chromedriver in laravel-dusk-ci docs.
Scheduled start of inbuilt Chromedriver (2.45). Chromedriver will be ready soon...
Starting ChromeDriver 2.45.615279 (12b89733300bd268cff3b78fc76cb8f3a7cc44e5) on port 9515
Only local connections are allowed.

Laravel 5.7 CI output:

$ bash -e configure-laravel
Application key set successfully.
The "public/storage" directory already exists.
Dropped all tables successfully.
Migration table created successfully.

Migrating: 2014_10_12_000000_create_users_table
Migrated:  2014_10_12_000000_create_users_table
Migrating: n
Migrated:  n
Seeding: XSeeder
Database seeding completed successfully.
System Chrome version: 72
System Chromedriver version: 2.45
Laravel Chromedriver version: 2.45
Chromedriver check OK.

PS: set -e on start of script would make it break in case of error with migration. Currently it does not.