mirror of
https://github.com/10h30/Test-Laravel-Migrations.git
synced 2026-06-05 15:07:54 +09:00
Update laravel.yml
This commit is contained in:
@@ -11,23 +11,20 @@ jobs:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
env:
|
||||
MYSQL_USER: root
|
||||
MYSQL_PASSWORD: password
|
||||
MYSQL_DATABASE: test
|
||||
ports:
|
||||
- 33306:3306
|
||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||
|
||||
|
||||
steps:
|
||||
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
|
||||
with:
|
||||
php-version: '8.0'
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up MySQL
|
||||
env:
|
||||
MYSQL_USER: root
|
||||
MYSQL_PASSWORD: root
|
||||
MYSQL_DATABASE: test_db
|
||||
run: |
|
||||
sudo /etc/init.d/mysql start
|
||||
mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }}
|
||||
- name: Copy .env
|
||||
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
||||
- name: Install Dependencies
|
||||
@@ -42,6 +39,7 @@ jobs:
|
||||
touch database/database.sqlite
|
||||
- name: Execute tests (Unit and Feature tests) via PHPUnit
|
||||
env:
|
||||
DB_PASSWORD: password
|
||||
DB_DATABASE: test
|
||||
DB_USERNAME: root
|
||||
DB_PASSWORD: root
|
||||
DB_DATABASE: test_db
|
||||
run: vendor/bin/phpunit
|
||||
|
||||
Reference in New Issue
Block a user