File tree Expand file tree Collapse file tree 4 files changed +17
-9
lines changed
Expand file tree Collapse file tree 4 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 11# php artisan key:generate
22APP_KEY=base64:nfTdlWswyvfctT6YNgk92bZaKWs5HfhdcyIXWmJUcuk=
33
4- # Must match compose.yml -> db -> environment
4+ # devcontainer
55DB_USERNAME=laravel
66DB_DATABASE=wannabe5
77DB_PASSWORD=mydevelopmentexample
88
9+
10+ # db (loading variables from dev_container, so no need to change here)
11+ POSTGRES_USER=${DB_USERNAME}
12+ POSTGRES_DB=${DB_DATABASE}
13+ POSTGRES_PASSWORD=${DB_PASSWORD}
14+
915TELESCOPE_ENABLED=true
1016# Log to stdout/stderr
1117LOG_LEVEL=debug
Original file line number Diff line number Diff line change @@ -6,12 +6,17 @@ APP_ENV=local
66# Intended for use in docker containers, meaning `php artisan serve` will accept traffic from any source
77SERVER_HOST = 0.0.0.0
88
9- # Must match compose.yml -> db -> environment
9+ # devcontainer
1010DB_HOST = db
1111DB_USERNAME = laravel
1212DB_DATABASE = wannabe5
1313DB_PASSWORD = mydevelopmentexample
1414
15+ # db (loading variables from dev_container, so no need to change here)
16+ POSTGRES_USER = ${ DB_USERNAME }
17+ POSTGRES_DB = ${ DB_DATABASE }
18+ POSTGRES_PASSWORD = ${ DB_PASSWORD }
19+
1520TELESCOPE_ENABLED = true
1621# Log to stdout/stderr
1722LOG_LEVEL = debug
Original file line number Diff line number Diff line change 1414 fetch-depth : 1
1515 - name : Setup database using docker
1616 run : |
17+ cp .env.ci.testing .env
1718 docker compose -f compose.yml up db -d
1819 - name : Setup PHP
1920 uses : shivammathur/setup-php@v2
2526 run : composer install -n --prefer-dist
2627 - name : Prepare Laravel Application
2728 run : |
28- cp .env.ci.testing .env
2929 php artisan key:generate
3030 php artisan migrate --force -n
3131 - name : Run tests
3434 run : |
3535 php artisan scramble:analyze
3636 php artisan scramble:export --path=openapi-ci.json
37- diff openapi.json openapi-ci.json
37+ diff openapi.json openapi-ci.json
Original file line number Diff line number Diff line change @@ -15,9 +15,6 @@ services:
1515 image : postgres
1616 ports :
1717 - 127.0.0.1:5432:5432
18- environment :
19- POSTGRES_USER : laravel
20- POSTGRES_DB : wannabe5
21- POSTGRES_PASSWORD : mydevelopmentexample
18+ env_file : .env
2219 volumes :
23- - ./scripts/create-test-db.sh:/docker-entrypoint-initdb.d/create-test-db.sh
20+ - ./scripts/create-test-db.sh:/docker-entrypoint-initdb.d/create-test-db.sh
You can’t perform that action at this time.
0 commit comments