mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Working on adding check-data to Travis
This commit is contained in:
parent
bb898d8f5a
commit
6eef179a67
27
.travis.yml
27
.travis.yml
@ -70,24 +70,25 @@ before_script:
|
||||
#- php artisan ninja:create-test-data 25
|
||||
|
||||
script:
|
||||
- php ./vendor/codeception/codeception/codecept run --debug acceptance AllPagesCept.php
|
||||
- php ./vendor/codeception/codeception/codecept run --debug acceptance APICest.php
|
||||
- php ./vendor/codeception/codeception/codecept run --debug acceptance TaxRatesCest.php
|
||||
- php ./vendor/codeception/codeception/codecept run --debug acceptance CheckBalanceCest.php
|
||||
- php ./vendor/codeception/codeception/codecept run --debug acceptance ClientCest.php
|
||||
- php ./vendor/codeception/codeception/codecept run --debug acceptance ExpenseCest.php
|
||||
- php ./vendor/codeception/codeception/codecept run --debug acceptance CreditCest.php
|
||||
- php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceCest.php
|
||||
- php ./vendor/codeception/codeception/codecept run --debug acceptance QuoteCest.php
|
||||
- php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceDesignCest.php
|
||||
- php ./vendor/codeception/codeception/codecept run --debug acceptance OnlinePaymentCest.php
|
||||
- php ./vendor/codeception/codeception/codecept run --debug acceptance PaymentCest.php
|
||||
- php ./vendor/codeception/codeception/codecept run --debug acceptance TaskCest.php
|
||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance AllPagesCept.php
|
||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance APICest.php
|
||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance TaxRatesCest.php
|
||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance CheckBalanceCest.php
|
||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance ClientCest.php
|
||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance ExpenseCest.php
|
||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance CreditCest.php
|
||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceCest.php
|
||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance QuoteCest.php
|
||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance InvoiceDesignCest.php
|
||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance OnlinePaymentCest.php
|
||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance PaymentCest.php
|
||||
#- php ./vendor/codeception/codeception/codecept run --debug acceptance TaskCest.php
|
||||
|
||||
#- sed -i 's/NINJA_DEV=true/NINJA_PROD=true/g' .env
|
||||
#- php ./vendor/codeception/codeception/codecept run acceptance GoProCest.php
|
||||
|
||||
after_script:
|
||||
- php artisan ninja:check-data --no-interaction
|
||||
- cat .env
|
||||
- mysql -u root -e 'select * from accounts;' ninja
|
||||
- mysql -u root -e 'select * from account_gateways;' ninja
|
||||
|
@ -4,6 +4,7 @@ namespace App\Console\Commands;
|
||||
|
||||
use Carbon;
|
||||
use DB;
|
||||
use Exception;
|
||||
use Illuminate\Console\Command;
|
||||
use Mail;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
@ -77,13 +78,15 @@ class CheckData extends Command
|
||||
$errorEmail = env('ERROR_EMAIL');
|
||||
|
||||
$this->info($this->log);
|
||||
|
||||
throw new Exception('Check data failed!!');
|
||||
if ($errorEmail) {
|
||||
Mail::raw($this->log, function ($message) use ($errorEmail) {
|
||||
$message->to($errorEmail)
|
||||
->from(CONTACT_EMAIL)
|
||||
->subject('Check-Data: ' . strtoupper($this->isValid ? RESULT_SUCCESS : RESULT_FAILURE));
|
||||
});
|
||||
} elseif (! $this->isValid) {
|
||||
throw new Exception('Check data failed!!');
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user