Skip to content

Commit 264fd20

Browse files
author
Given Ncube
committed
fix(ci): updated github actions
1 parent db5fbc8 commit 264fd20

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.github/workflows/run-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
run: |
4343
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
4444
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
45+
touch database/database.sqlite
4546
4647
- name: Execute tests
47-
run: vendor/bin/pest -vvv
48+
run: vendor/bin/pest

tests/TestCase.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ protected function setUp(): void
2121
});
2222

2323
Factory::guessFactoryNamesUsing(
24-
fn (
24+
fn(
2525
string $modelName
26-
) => 'FlixtechsLabs\\LaravelAuthorizer\\Database\\Factories\\'.
27-
class_basename($modelName).
26+
) => 'FlixtechsLabs\\LaravelAuthorizer\\Database\\Factories\\' .
27+
class_basename($modelName) .
2828
'Factory'
2929
);
3030
}
@@ -37,6 +37,11 @@ protected function getPackageProviders($app)
3737
public function getEnvironmentSetUp($app)
3838
{
3939
config()->set('database.default', 'testing');
40+
config()->set('database.connections.testing', [
41+
'driver' => 'sqlite',
42+
'database' => 'database/database.sqlite',
43+
'prefix' => '',
44+
]);
4045

4146
/*
4247
$migration = include __DIR__.'/../database/migrations/create_laravel-authorizer_table.php.stub';

0 commit comments

Comments
 (0)