-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathci_script
43 lines (41 loc) · 1.14 KB
/
ci_script
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
#!/usr/bin/env bash
# Run tests with Larasset server who serve assets
## Config
export APP_ENV=testing
php artisan server &
sleep 5
## Tests
if ./vendor/bin/codecept run acceptance --env=php ; then
if ./vendor/bin/codecept run acceptance --env=phantom ; then
if ./vendor/bin/codecept run acceptance --env=firefox ; then
# Run tests with precompiled assets
## Config
killall php node # Kill the Laravel and Larasset servers
export ASSETS_ENV=$APP_ENV # Simulate production environment for Larasset
if php artisan larasset:precompile --assets-env $APP_ENV ; then
php artisan serve & # Run only the Laravel server because the assets are now precompiled
sleep 4
## Tests
if ./vendor/bin/codecept run acceptance --env=php ; then
if ./vendor/bin/codecept run acceptance --env=phantom ; then
if ! ./vendor/bin/codecept run acceptance --env=firefox ; then
exit 1
fi
else
exit 1
fi
else
exit 1
fi
else
exit 1
fi
else
exit 1
fi
else
exit 1
fi
else
exit 1
fi