Skip to content

Commit

Permalink
pull request checks
Browse files Browse the repository at this point in the history
  • Loading branch information
adrenallen committed Feb 7, 2025
1 parent 898f137 commit 91c1f05
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/pull-request-checks.yml
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

0 comments on commit 91c1f05

Please sign in to comment.