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_HOST=127.0.0.1
|
||||
DB_PORT=5432
|
||||
DB_DATABASE=
|
||||
DB_USERNAME=
|
||||
DB_PASSWORD=
|
||||
DB_DATABASE=jbuktest
|
||||
DB_USERNAME=postgres
|
||||
DB_PASSWORD=postgres
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
|
|
20
.github/workflows/run-tests.yml
vendored
20
.github/workflows/run-tests.yml
vendored
|
@ -8,7 +8,17 @@ jobs:
|
|||
phpunit:
|
||||
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:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -22,15 +32,7 @@ jobs:
|
|||
run: chmod -R 777 storage bootstrap/cache
|
||||
- name: Setup test database
|
||||
run: |
|
||||
mkdir -p database
|
||||
touch database/database.sqlite
|
||||
php artisan migrate
|
||||
php artisan db:seed
|
||||
- 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
|
||||
|
|
Loading…
Add table
Reference in a new issue