2019-10-03 10:08:25 +02:00
|
|
|
name: Laravel
|
|
|
|
|
|
2020-02-12 13:26:01 -05:00
|
|
|
on:
|
|
|
|
|
push:
|
2020-07-13 12:12:41 -07:00
|
|
|
branches: [ $default-branch ]
|
2020-02-12 13:26:01 -05:00
|
|
|
pull_request:
|
2020-07-13 12:12:41 -07:00
|
|
|
branches: [ $default-branch ]
|
2019-10-03 10:08:25 +02:00
|
|
|
|
2019-09-20 18:44:58 +02:00
|
|
|
jobs:
|
|
|
|
|
laravel-tests:
|
2020-02-21 12:55:06 -05:00
|
|
|
|
2019-09-20 18:44:58 +02:00
|
|
|
runs-on: ubuntu-latest
|
2020-07-13 12:12:41 -07:00
|
|
|
|
2019-09-20 18:44:58 +02:00
|
|
|
steps:
|
2021-04-27 22:42:11 +05:30
|
|
|
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
|
2020-12-17 01:57:39 +05:45
|
|
|
with:
|
|
|
|
|
php-version: '8.0'
|
2019-12-24 14:22:22 -08:00
|
|
|
- uses: actions/checkout@v2
|
2019-09-20 18:44:58 +02:00
|
|
|
- name: Copy .env
|
|
|
|
|
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
|
|
|
|
|
- name: Install Dependencies
|
2020-05-08 09:48:58 +02:00
|
|
|
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
|
2019-09-20 18:44:58 +02:00
|
|
|
- name: Generate key
|
|
|
|
|
run: php artisan key:generate
|
2019-12-24 19:57:16 +07:00
|
|
|
- name: Directory Permissions
|
|
|
|
|
run: chmod -R 777 storage bootstrap/cache
|
2019-09-20 18:44:58 +02:00
|
|
|
- name: Create Database
|
|
|
|
|
run: |
|
|
|
|
|
mkdir -p database
|
|
|
|
|
touch database/database.sqlite
|
|
|
|
|
- name: Execute tests (Unit and Feature tests) via PHPUnit
|
|
|
|
|
env:
|
|
|
|
|
DB_CONNECTION: sqlite
|
|
|
|
|
DB_DATABASE: database/database.sqlite
|
|
|
|
|
run: vendor/bin/phpunit
|