Skip to content

feat: More Specific Test Suite Assertions #82

feat: More Specific Test Suite Assertions

feat: More Specific Test Suite Assertions #82

Workflow file for this run

name: run-tests
on:
push:
branches:
- main
- '*.x'
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.2, 8.3]
laravel: [11.*]
stability: [prefer-stable]
include:
- laravel: 11.*
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: fileinfo, pdo, pdo_sqlite, sqlite, zip
coverage: none
- name: Setup Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
npm i
- name: Copy DotEnv
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Generate key
run: php artisan key:generate
- name: Set directory permissions
run: chmod -R 777 storage bootstrap/cache
- name: Compile the assets & start the server
run: npm run build && php artisan inertia:start-ssr &
- name: Create test database
run: touch database/database.sqlite
- name: Run the linters
run: npm run lint
- name: Execute Type tests via Larastan
run: composer test:types
- name: Execute Unit tests with PHPUnit via Pest
run: php artisan test