Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/composer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,5 @@ jobs:
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Lint and analyse
- name: Lint, analyse and test
run: composer ci

# - name: Run test suite
# run: composer test
9 changes: 8 additions & 1 deletion bin/migrate
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
require_once __DIR__ . '/../vendor/autoload.php';

use KittyShare\Manager\ConfigManager;
use KittyShare\Manager\InvalidConfigurationException;
use KittyShare\Database\SQLiteDatabase;
use KittyShare\Database\SQLiteMigrator;
use KittyShare\Repository\SQLiteDBVersionRepository;
Expand All @@ -25,7 +26,13 @@ if (php_sapi_name() !== 'cli') {
exit(1);
}

$databasePath = ConfigManager::get()->databasePath;
try {
$databasePath = ConfigManager::get()->databasePath;
} catch (InvalidConfigurationException $e) {
fwrite(STDERR, 'Invalid configuration: ' . $e->getMessage() . "\n");

exit(1);
}

$parentDir = dirname($databasePath);

Expand Down
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"php": "^8.4"
},
"require-dev": {
"phpunit/phpunit": "^13",
"phpstan/phpstan": "^2.2"
},
"scripts": {
Expand All @@ -22,9 +23,10 @@
"ci": [
"@lint",
"@analyse",
"@check:migrations"
"@check:migrations",
"@test"
],
"test": "echo 'No test suite yet.' && exit 1",
"test": "vendor/bin/phpunit --bootstrap vendor/autoload.php tests",
"start": "php -S localhost:8000 -t public"
}
}
Loading
Loading