Skip to content

Commit

Permalink
fix: set app env
Browse files Browse the repository at this point in the history
  • Loading branch information
patoui committed Nov 29, 2024
1 parent 4b5f937 commit 05685ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,6 @@ jobs:
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run PHPUnit
env:
APP_ENV: ci
run: vendor/bin/phpunit
3 changes: 2 additions & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,12 @@ protected function getPackageProviders($app): array
*/
protected function getEnvironmentSetUp($app): void
{
echo sprintf("APP ENV: %s\n", env('APP_ENV') ?: 'not set');
$app['config']->set('app.key', '603046c97f00a193540915');
$app['config']->set('database.default', 'clickhouse');
$app['config']->set('database.connections.clickhouse', [
'driver' => 'clickhouse',
'host' => 'lc_clickhouse',
'host' => env('APP_ENV') === 'ci' ? 'localhost' : 'lc_clickhouse',
'port' => '9000',
'username' => 'default',
'password' => '',
Expand Down

0 comments on commit 05685ae

Please sign in to comment.