Skip to content

Commit

Permalink
Fix the .env of the test
Browse files Browse the repository at this point in the history
  • Loading branch information
ysbrandB committed Jun 15, 2024
1 parent c5b35cb commit 73a933b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
8 changes: 8 additions & 0 deletions .env.ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
PHP_VERSION=8.3
NODE_VERSION=20
#the id of the Item that is python. This is used to link everything together
PYTHON_ID=1
DB_HOST: 127.0.0.1
DB_DATABASE: test_db
DB_USERNAME: user
DB_PASSWORD: password
9 changes: 2 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ jobs:
mysql:
image: mysql
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: test_db
MYSQL_USER: user
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: rootpassword
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
Expand All @@ -76,15 +76,10 @@ jobs:
php-version: ${{ env.PHP_VERSION }}
coverage: none
- name: 🔍 Read .env
run: grep -E 'PHP_VERSION' .env.prod >> $GITHUB_ENV
run: (grep -E 'PHP_VERSION' .env.prod >> $GITHUB_ENV && cp .env.ci .env)

- uses: ramsey/composer-install@v3
- name: 🐘 Run PHP tests
env:
DB_HOST: 127.0.0.1
DB_DATABASE: test_db
DB_USERNAME: user
DB_PASSWORD: password
run: (php artisan key:generate && php artisan migrate && php artisan test)


Expand Down

0 comments on commit 73a933b

Please sign in to comment.