Skip to content

Tests

Tests #7

Workflow file for this run

name: Tests
on:
push:
branches:
- 1.x
pull_request:
branches:
- 1.x
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: [8.2, 8.3]
laravel: ['11.*']
name: OS:${{ matrix.os }} / PHP:${{ matrix.php }} / Laravel:${{ matrix.laravel }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18.x
- run: npm install
- run: npm run build
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
tools: composer:v2
coverage: none
- name: Install Composer
run: |
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-progress --ansi --no-update --with-all-dependencies
composer update --no-interaction --no-progress --ansi
- name: Rector Cache
uses: actions/cache@v4
with:
path: ./var/cache/rector
key: ${{ runner.os }}-rector-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-rector-
- name: Setup Google Chrome
run: vendor/bin/dusk-updater detect --auto-update
- name: Running Pint
run: ./vendor/bin/pint --test
- name: Running Type Coverage
run: ./vendor/bin/pest --type-coverage --min=100
- name: Running Rector
run: ./vendor/bin/rector process --dry-run --config=rector.php
- name: Running PhpStan
run: ./vendor/bin/phpstan --configuration="phpstan.neon"
- name: Running Structure Tests
run: ./vendor/bin/pest --ci --filter Structure
- name: Running Browser Tests
run: ./vendor/bin/pest --ci --filter Browser --order-by random --stop-on-failure
env:
CI: true