Skip to content

Merge branch 'development' of https://github.com/CarvingIT/smart-arch… #382

Merge branch 'development' of https://github.com/CarvingIT/smart-arch…

Merge branch 'development' of https://github.com/CarvingIT/smart-arch… #382

Workflow file for this run

name: Laravel with php7.4
on:
push:
branches: [ master, development ]
pull_request:
branches: [ master, development ]
jobs:
laravel-tests:
services:
mysql:
image: mariadb:10.3.25
env:
MYSQL_ROOT_PASSWORD: SR_test123
MYSQL_DATABASE: SR_test
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@b7d1d9c9a92d8d8463ce36d7f60da34d461724f8
with:
php-version: '7.4'
- uses: actions/checkout@v2
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.testing', '.env');"
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- uses: actions/setup-node@v1
- name: Install Node Dependencies
run: npm install
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Migrate and Seed the database
env:
DB_CONNECTION: mysql
DB_DATABASE: SR_test
DB_USERNAME: root
DB_PASSWORD: SR_test123
DB_PORT: ${{ job.services.mysql.ports[3306] }}
run: php artisan migrate:fresh --seed
# - name: Seed the DB with users for testing
# env:
# DB_CONNECTION: mysql
# DB_DATABASE: SR_test
# DB_USERNAME: root
# DB_PASSWORD: SR_test123
# DB_PORT: ${{ job.services.mysql.ports[3306] }}
# run: php artisan db:seed --class=UserSeeder
- name: Generate key
run: php artisan key:generate
- name: Execute tests (Unit and Feature tests) via PHPUnit
env:
DB_CONNECTION: mysql
DB_DATABASE: SR_test
DB_USERNAME: root
DB_PASSWORD: SR_test123
DB_PORT: ${{ job.services.mysql.ports[3306] }}
run: vendor/bin/phpunit