Skip to content

A self-hosted media server and file management system

try new CI file

aminnausine35b5e2fd993
diff --git a/.env.example b/.env.example
index 22d835a5..ba2d1d33 100644
--- a/.env.example
+++ b/.env.example
@@ -2,12 +2,11 @@ APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
-APP_URL=https://app.test:8080
-SESSION_DOMAIN=app.test
-SANCTUM_STATEFUL_DOMAINS=app.test:8080
+APP_URL=https://127.0.0.1:8080
+SESSION_DOMAIN=127.0.0.1
+SANCTUM_STATEFUL_DOMAINS=127.0.0.1:8080
DEBUGBAR_ENABLED=false
-MASTER_STORAGE=false
LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
diff --git a/.github/workflows/laravel.yml b/.github/workflows/laravel.yml
index 9e6af310..4d7a6b72 100644
--- a/.github/workflows/laravel.yml
+++ b/.github/workflows/laravel.yml
@@ -9,33 +9,72 @@ on:
jobs:
laravel-tests:
runs-on: ubuntu-latest
+ env:
+ DB_CONNECTION: pgsql
+ DB_HOST: localhost
+ DB_PASSWORD: postgres
+ DB_USERNAME: postgres
+ DB_DATABASE: postgres
+
+ services:
+ postgres:
+ image: postgres:latest
+ env:
+ POSTGRES_USER: postgres
+ POSTGRES_PASSWORD: postgres
+ POSTGRES_DB: postgres
+
+ ports:
+ - 5432/tcp
+ options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
steps:
- name: Set up Node.js
uses: actions/setup-node@v3
- - uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
+
+ - name: Set up PHP
+ uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: "8.2"
+ extensions: pgsql
+
- uses: actions/checkout@v4
+
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
+
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
+
- name: Install node dependencies
run: npm ci
+
- name: Generate key
run: php artisan key:generate
+
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- - name: Create Database
- run: |
- mkdir -p database
- touch database/database.sqlite
- php artisan storage:link
+
+ # - name: Clear Config
+ # run: php artisan config:clear
+
+ - name: Run Migration
+ run: php artisan migrate -v
+ env:
+ DB_PORT: ${{ job.services.postgres.ports[5432] }}
+
+ - name: Test with phpunit
+ run: vendor/bin/phpunit --coverage-text
+ env:
+ DB_PORT: ${{ job.services.postgres.ports[5432] }}
+
- name: Build
run: npm run build
+
+ - name: Lint
+ run: npm run lint
+
- name: Execute tests (Unit and Feature tests) via PHPUnit/Pest
env:
- DB_CONNECTION: sqlite
- DB_DATABASE: database/database.sqlite
- run: php artisan test
+ DB_PORT: ${{ job.services.postgres.ports[5432] }}
+ run: php artisan test
\ No newline at end of file