Skip to content

tests

tests #1936

Workflow file for this run

name: tests
on:
push:
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
run:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.2]
laravel: [11.0]
name: P${{ matrix.php }} - L${{ matrix.laravel }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite
coverage: none
- name: Create Laravel app
run: composer create-project laravel/laravel=${{ matrix.laravel }} ../app --prefer-dist
- name: Install dependencies
run: |
cd ../app
composer require livewire/livewire:^3.4
composer config repositories.local '{"type": "path", "url": "../tall"}' --file composer.json
composer require laravel-frontend-presets/tall:@dev
- name: Install preset
run: |
cd ../app
php artisan ui tall --auth
- name: Overwrite configuration
run: |
cd ../app
rm phpunit.xml
cp ../tall/.github/workflows/phpunit.xml.stub ./phpunit.xml
- name: Execute tests
run: |
cd ../app
vendor/bin/phpunit