Merge pull request #87 from HE-Arc/simon-plumey-76-ajouter-indices-au… #123
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Laravel | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
laravel-tests: | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:8.0 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
MYSQL_DATABASE: musicguessr | |
ports: | |
- 3306: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.1' | |
- uses: actions/checkout@v3 | |
- name: Copy .env | |
run: cp .env.ci .env | |
- name: Update Composer | |
run: composer update | |
- name: Install Dependencies | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- name: npm install | |
run: npm install | |
- name: Generate key | |
run: php artisan key:generate | |
- name: Directory Permissions | |
run: chmod -R 777 storage bootstrap/cache | |
- name: start vite | |
run: npm run build | |
- name: run migrations | |
run: php artisan migrate --seed | |
- name: Execute tests (Unit and Feature tests) via laravel | |
run: php artisan test |