-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
898f137
commit 91c1f05
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Pull Request Checks | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
laravel-tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.2' | ||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite | ||
tools: composer:v2 | ||
|
||
- name: Copy .env | ||
run: php -r "file_exists('.env') || copy('.env.example', '.env');" | ||
|
||
- name: Install Dependencies | ||
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Install NPM Dependencies | ||
run: npm install | ||
|
||
- name: Generate Application Key | ||
run: php artisan key:generate | ||
|
||
- name: Directory Permissions | ||
run: chmod -R 777 storage bootstrap/cache | ||
|
||
- name: Install Laravel Sail | ||
run: composer require laravel/sail --dev | ||
|
||
- name: Install Docker | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Start Laravel Sail | ||
run: ./vendor/bin/sail up -d | ||
|
||
- name: Run Pre-Commit Checks | ||
run: ./vendor/bin/sail artisan dev:check | ||
|
||
- name: Stop Laravel Sail | ||
if: always() | ||
run: ./vendor/bin/sail down |