Skip to content

Garrett/tms 59 add GitHub workflows to run artisan devcheck to confirm a pr #1

Garrett/tms 59 add GitHub workflows to run artisan devcheck to confirm a pr

Garrett/tms 59 add GitHub workflows to run artisan devcheck to confirm a pr #1

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