39 lines
839 B
YAML
39 lines
839 B
YAML
|
|
name: CI
|
||
|
|
|
||
|
|
on:
|
||
|
|
push:
|
||
|
|
branches: [ main ]
|
||
|
|
pull_request:
|
||
|
|
branches: [ main ]
|
||
|
|
|
||
|
|
jobs:
|
||
|
|
test:
|
||
|
|
runs-on: ubuntu-latest
|
||
|
|
|
||
|
|
steps:
|
||
|
|
- uses: actions/checkout@v4
|
||
|
|
|
||
|
|
- name: Setup PHP
|
||
|
|
uses: shivammathur/setup-php@v2
|
||
|
|
with:
|
||
|
|
php-version: '8.2'
|
||
|
|
extensions: mbstring, xml, bcmath, pdo, sqlite, pdo_sqlite
|
||
|
|
coverage: none
|
||
|
|
|
||
|
|
- name: Install dependencies
|
||
|
|
run: composer install --prefer-dist --no-progress
|
||
|
|
|
||
|
|
- name: Run PHPStan
|
||
|
|
run: ./vendor/bin/phpstan analyse --memory-limit=256M
|
||
|
|
|
||
|
|
- name: Prepare Laravel Application
|
||
|
|
run: |
|
||
|
|
cp .env.example .env
|
||
|
|
php artisan key:generate
|
||
|
|
php artisan config:clear
|
||
|
|
|
||
|
|
- name: Run PHPUnit Tests
|
||
|
|
env:
|
||
|
|
DB_CONNECTION: sqlite
|
||
|
|
DB_DATABASE: ':memory:'
|
||
|
|
run: php artisan test
|