mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-28 17:01:16 +00:00
Use SQLite for tests
This commit is contained in:
@@ -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 =
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user