updated tests workflow

This commit is contained in:
pushrbx 2024-01-26 00:15:59 +00:00
parent 77f6090dae
commit fef2759592
2 changed files with 4 additions and 1 deletions

View File

@ -40,6 +40,9 @@ jobs:
run: | run: |
docker run --rm --network host mongo:6 mongosh localhost:27017 --eval "db.runCommand({ serverStatus: 1 })" docker run --rm --network host mongo:6 mongosh localhost:27017 --eval "db.runCommand({ serverStatus: 1 })"
- name: Show Typesense server status
run: curl -s -f http://localhost:8108/health
- name: Setup extension cache - name: Setup extension cache
id: extcache id: extcache
uses: shivammathur/cache-extensions@v1 uses: shivammathur/cache-extensions@v1

View File

@ -1,6 +1,6 @@
<?php <?php
$db_username = env('DB_USERNAME', 'admin'); $db_username = env('DB_USERNAME', env("APP_ENV") === "testing" ? "" : "admin");
$dsn = "mongodb://"; $dsn = "mongodb://";
if (empty($db_username)) { if (empty($db_username)) {
$dsn .= env('DB_HOST', 'localhost').":".env('DB_PORT', 27017)."/".env('DB_ADMIN', 'admin'); $dsn .= env('DB_HOST', 'localhost').":".env('DB_PORT', 27017)."/".env('DB_ADMIN', 'admin');