mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-09 18:06:54 +01:00
* [ADD] Travis CI
This commit is contained in:
@@ -11,7 +11,7 @@ before_script:
|
||||
- composer self-update
|
||||
- composer install --prefer-source --no-interaction --dev
|
||||
|
||||
script: ./vendor/bin/phpunit --bootstrap ./test/bootstrap.php ./test
|
||||
script: ./vendor/bin/phpunit -c ./phpunit.xml
|
||||
|
||||
notifications:
|
||||
on_success: never
|
||||
|
||||
12
phpunit.xml
Normal file
12
phpunit.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.3/phpunit.xsd"
|
||||
bootstrap="./test/bootstrap.php">
|
||||
</phpunit>
|
||||
<testsuites>
|
||||
<testsuite name="sysPass">
|
||||
<directory suffix=".php">./test</directory>
|
||||
<exclude>./test/res</exclude>
|
||||
<exclude>./test/tmp</exclude>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
@@ -50,22 +50,28 @@ define('SELF_HOSTNAME', gethostbyaddr(SELF_IP_ADDRESS));
|
||||
require APP_ROOT . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
|
||||
require APP_ROOT . DIRECTORY_SEPARATOR . 'lib' . DIRECTORY_SEPARATOR . 'BaseFunctions.php';
|
||||
|
||||
print 'APP_ROOT=' . APP_ROOT . PHP_EOL;
|
||||
|
||||
// Setup directories
|
||||
if (!is_dir(TMP_DIR)) {
|
||||
print 'Creating ' . TMP_DIR . PHP_EOL;
|
||||
|
||||
mkdir(TMP_DIR);
|
||||
} else {
|
||||
print 'Deleting ' . TMP_DIR . PHP_EOL;
|
||||
|
||||
// Delete tmp dir ...
|
||||
array_map('unlink', glob(TMP_DIR . DIRECTORY_SEPARATOR . '*'));
|
||||
}
|
||||
|
||||
if (is_dir(CONFIG_PATH)
|
||||
&& decoct(fileperms(CONFIG_PATH) & 0777) !== '750'
|
||||
) {
|
||||
print 'Setting permissions for ' . CONFIG_PATH . PHP_EOL;
|
||||
|
||||
chmod(CONFIG_PATH, 750);
|
||||
}
|
||||
|
||||
// Delete tmp dir ...
|
||||
array_map('unlink', glob(TMP_DIR . DIRECTORY_SEPARATOR . '*'));
|
||||
|
||||
print 'APP_ROOT=' . APP_ROOT;
|
||||
|
||||
/**
|
||||
* Función para llamadas a gettext
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user