Skip to content

Commit

Permalink
Update laravel.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
berkanumutlu committed Sep 11, 2024
1 parent f020af1 commit 9e45289
Showing 1 changed file with 23 additions and 21 deletions.
44 changes: 23 additions & 21 deletions .github/workflows/laravel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,26 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.1'
- uses: actions/checkout@v4
- name: Copy .env if not exists
run: php -r "file_exists('project/.env') || copy('project/.env.example', 'project/.env');"
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Generate key if not exists
run: |
if ! grep -q "APP_KEY=" project/.env; then
php -r "echo 'APP_KEY=' . bin2hex(random_bytes(32)) . PHP_EOL;" >> project/.env
fi
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Create Database
run: |
mkdir -p database
touch database/database.sql
- name: Execute tests (Unit and Feature tests) via PHPUnit/Pest
run: php artisan test
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.1'
- uses: actions/checkout@v4
- name: Copy .env if not exists
run: php -r "file_exists('project/.env') || copy('project/.env.example', 'project/.env');"
- name: Clear Composer Cache
run: composer clear-cache
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Generate key if not exists
run: |
if ! grep -q "APP_KEY=" project/.env; then
php -r "echo 'APP_KEY=' . bin2hex(random_bytes(32)) . PHP_EOL;" >> project/.env
fi
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Create Database
run: |
mkdir -p database
touch database/database.sql
- name: Execute tests (Unit and Feature tests) via PHPUnit/Pest
run: php artisan test

0 comments on commit 9e45289

Please sign in to comment.