Skip to content

Update laravel.yml (╥﹏╥) #7

Update laravel.yml (╥﹏╥)

Update laravel.yml (╥﹏╥) #7

Workflow file for this run

name: Laravel
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
laravel-tests:
runs-on: ubuntu-latest
strategy:
matrix:
mongodb-version: ['7.0']
steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.1'
extensions: mongodb
- uses: actions/checkout@v3
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.10.0
with:
mongodb-version: ${{ matrix.mongodb-version }}
mongodb-username: root
mongodb-password: example
mongodb-db: lus
- name: Copy .env
run: php -r "file_exists('./mainPage/.env') || copy('./mainPage/.env.example', './mainPage/.env');"
- name: Install Dependencies
run: cd ./mainPage && rm -rf composer.lock && composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Generate key
run: cd ./mainPage && php artisan key:generate
- name: Run migrations
env:
DB_CONNECTION: mongodb
DB_HOST: 127.0.0.1
DB_PORT: 27017
DB_DATABASE: lus
DB_USERNAME: root
DB_PASSWORD: example
run: cd ./mainPage && php artisan migrate:fresh --seed
- name: Directory Permissions
run: cd ./mainPage && chmod -R 777 storage bootstrap/cache
- name: Execute tests (Unit and Feature tests) via PHPUnit/Pest
env:
DB_CONNECTION: mongodb
DB_HOST: 127.0.0.1
DB_PORT: 27017
DB_DATABASE: lus
DB_USERNAME: root
DB_PASSWORD: example
run: cd ./mainPage && php artisan test