Use Postgresql in tests
This commit is contained in:
parent
3c3463d33f
commit
a4f8e6f5b2
2 changed files with 14 additions and 12 deletions
|
@ -7,9 +7,9 @@ APP_LOG_LEVEL=warning
|
||||||
DB_CONNECTION=pgsql
|
DB_CONNECTION=pgsql
|
||||||
DB_HOST=127.0.0.1
|
DB_HOST=127.0.0.1
|
||||||
DB_PORT=5432
|
DB_PORT=5432
|
||||||
DB_DATABASE=
|
DB_DATABASE=jbuktest
|
||||||
DB_USERNAME=
|
DB_USERNAME=postgres
|
||||||
DB_PASSWORD=
|
DB_PASSWORD=postgres
|
||||||
|
|
||||||
BROADCAST_DRIVER=log
|
BROADCAST_DRIVER=log
|
||||||
CACHE_DRIVER=file
|
CACHE_DRIVER=file
|
||||||
|
|
20
.github/workflows/run-tests.yml
vendored
20
.github/workflows/run-tests.yml
vendored
|
@ -8,7 +8,17 @@ jobs:
|
||||||
phpunit:
|
phpunit:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
name: PHPUnit
|
name: PHPUnit test suite
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:12
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
POSTGRES_DB: jbuktest
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -22,15 +32,7 @@ jobs:
|
||||||
run: chmod -R 777 storage bootstrap/cache
|
run: chmod -R 777 storage bootstrap/cache
|
||||||
- name: Setup test database
|
- name: Setup test database
|
||||||
run: |
|
run: |
|
||||||
mkdir -p database
|
|
||||||
touch database/database.sqlite
|
|
||||||
php artisan migrate
|
php artisan migrate
|
||||||
php artisan db:seed
|
php artisan db:seed
|
||||||
- name: Execute tests (Unit and Feature tests) via PHPUnit
|
- name: Execute tests (Unit and Feature tests) via PHPUnit
|
||||||
env:
|
|
||||||
DB_CONNECTION: sqlite
|
|
||||||
DB_DATABASE: database/database.sqlite
|
|
||||||
CACHE_DRIVER: array
|
|
||||||
SESSION_DRIVER: array
|
|
||||||
QUEUE_DRIVER: sync
|
|
||||||
run: vendor/bin/phpunit
|
run: vendor/bin/phpunit
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue