diff --git a/.env.ci b/.env.ci new file mode 100644 index 0000000..a661b6e --- /dev/null +++ b/.env.ci @@ -0,0 +1,25 @@ +APP_ENV=ci +APP_KEY= +APP_DEBUG=true + +DB_CONNECTION=mysql +DB_HOST=127.0.0.1 +DB_PORT=3306 +DB_DATABASE=rezultatevot +DB_USERNAME=root +DB_PASSWORD=tests + +SESSION_DRIVER=database +SESSION_LIFETIME=120 + +BROADCAST_CONNECTION=log +FILESYSTEM_DISK=local +QUEUE_CONNECTION=redis + +CACHE_STORE=redis + +REDIS_HOST=127.0.0.1 +REDIS_PASSWORD=null +REDIS_PORT=6379 + +MAIL_MAILER=log diff --git a/.env.example b/.env.example index ee8462b..d08d116 100644 --- a/.env.example +++ b/.env.example @@ -1,17 +1,9 @@ -APP_NAME="Rezultate Vot" APP_ENV=local APP_KEY= APP_DEBUG=true APP_TIMEZONE=UTC APP_URL=http://localhost -APP_LOCALE=ro -APP_FALLBACK_LOCALE=ro -APP_FAKER_LOCALE=ro_RO - -APP_MAINTENANCE_DRIVER=file -# APP_MAINTENANCE_STORE=database - LOG_CHANNEL=stack LOG_STACK=single LOG_DEPRECATIONS_CHANNEL=null diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7611669..0af1a85 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,6 +13,29 @@ jobs: php-version: - '8.2' + services: + mysql: + image: mysql:8.0 + env: + MYSQL_DATABASE: rezultatevot + MYSQL_ALLOW_EMPTY_PASSWORD: true + ports: + - 3306 + options: >- + --health-cmd "mysqladmin ping" + --health-interval 10s + --health-timeout 5s + --health-retries 3 + redis: + image: redis:7.4 + ports: + - 6379 + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + env: extensions: mbstring, intl, gd @@ -64,6 +87,11 @@ jobs: - name: Run tests run: php artisan test + env: + DB_HOST: mysql + DB_PORT: ${{ job.services.mysql.ports[3306] }} + REDIS_HOST: redis + REDIS_PORT: ${{ job.services.redis.ports[6379] }} - name: Upload logs if: always() diff --git a/config/app.php b/config/app.php index b025002..d6cc1c1 100644 --- a/config/app.php +++ b/config/app.php @@ -80,11 +80,11 @@ | */ - 'locale' => env('APP_LOCALE', 'en'), + 'locale' => env('APP_LOCALE', 'ro'), 'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'), - 'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'), + 'faker_locale' => env('APP_FAKER_LOCALE', 'ro_RO'), /* |--------------------------------------------------------------------------