Use SQLite for tests

This commit is contained in:
DariusIII
2026-02-13 13:48:09 +01:00
parent 2dda3bbb23
commit 9a61f43534
2 changed files with 7 additions and 25 deletions
+2 -7
View File
@@ -1,10 +1,5 @@
DB_CONNECTION=mariadb DB_CONNECTION=testing
DB_HOST = 127.0.0.1 DB_DATABASE=:memory:
DB_PORT = 3306
DB_SOCKET =
DB_USERNAME = TEST
DB_PASSWORD = TEST
DB_DATABASE = TEST
NNTP_USERNAME = NNTP_USERNAME =
NNTP_PASSWORD = NNTP_PASSWORD =
+5 -18
View File
@@ -12,17 +12,7 @@ jobs:
php: [ 8.5 ] php: [ 8.5 ]
name: PHP ${{ matrix.php }} name: PHP ${{ matrix.php }}
services:
mysql:
image: mariadb:10
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: TEST
MYSQL_USER: TEST
MYSQL_PASSWORD: TEST
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
@@ -30,7 +20,7 @@ jobs:
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php }} php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, pdo_mysql extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
coverage: none coverage: none
- name: Copy env file - name: Copy env file
@@ -41,13 +31,10 @@ jobs:
run: composer update --prefer-dist --no-interaction --no-progress --no-scripts run: composer update --prefer-dist --no-interaction --no-progress --no-scripts
- name: Generate app key - name: Generate app key
run: php artisan key:generate --no-interaction run: |
APP_KEY=$(php -r "echo 'base64:' . base64_encode(random_bytes(32));")
sed -i "s/APP_KEY=.*/APP_KEY=$APP_KEY/" .env
- name: Run database migrations
run: php artisan migrate --force
- name: Run package discovery
run: php artisan package:discover --ansi
- name: Run tests - name: Run tests
run: vendor/bin/phpunit run: vendor/bin/phpunit