mirror of
https://github.com/notf0und/SGS
synced 2026-07-17 18:21:06 +00:00
63 lines
1.4 KiB
YAML
63 lines
1.4 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
pull_request:
|
|
branches: ['**']
|
|
|
|
jobs:
|
|
test:
|
|
name: Run test suite
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '8.4'
|
|
extensions: mbstring
|
|
coverage: none
|
|
|
|
- name: Install Composer dependencies
|
|
working-directory: www
|
|
run: composer install --no-interaction --prefer-dist --optimize-autoloader
|
|
|
|
- name: Set up environment
|
|
working-directory: www
|
|
run: |
|
|
cp .env.example .env
|
|
php artisan key:generate
|
|
|
|
- name: Build frontend assets
|
|
working-directory: www
|
|
run: npm ci && npm run build
|
|
|
|
- name: Run tests
|
|
working-directory: www
|
|
run: php artisan test
|
|
|
|
lint:
|
|
name: Check code style (Pint)
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '8.4'
|
|
extensions: mbstring
|
|
coverage: none
|
|
|
|
- name: Install Composer dependencies
|
|
working-directory: www
|
|
run: composer install --no-interaction --prefer-dist --optimize-autoloader
|
|
|
|
- name: Run Pint
|
|
working-directory: www
|
|
run: ./vendor/bin/pint --test
|