Skip to content

tests

tests #155

Workflow file for this run

name: tests
on:
push:
branches:
- main
- '*.x'
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
static-analysis:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [ 8.2, 8.3 ]
laravel: [ 12 ]
name: Static Analysis - P${{ matrix.php }} - L${{ matrix.laravel }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pdo, pdo_sqlite
tools: composer:v2
coverage: none
- name: Install dependencies
run: |
composer require "illuminate/contracts:^${{ matrix.laravel }}" --no-interaction --no-update
composer update --prefer-dist --no-interaction
- name: Run PHPStan
run: composer test:types -- --error-format=github
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [ 8.2, 8.3 ]
laravel: [ 12 ]
name: Run Tests - P${{ matrix.php }} - L${{ matrix.laravel }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pdo, pdo_sqlite
tools: composer:v2
- name: Install dependencies
run: |
composer require "illuminate/contracts:^${{ matrix.laravel }}" --no-interaction --no-update
composer update --prefer-dist --no-interaction
- name: Execute tests
run: composer test:coverage
test-react-starter-kit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ 8.2, 8.3, 8.4 ]
laravel: [ 12 ]
tester: [ phpunit, pest ]
name: Test React Starter Kit Integrations - P${{ matrix.php }} – L${{ matrix.laravel }} (${{ matrix.tester }})
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pdo, pdo_sqlite
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: none
- name: Setup Project
run: |
composer create-project laravel/react-starter-kit example-app
- name: Checkout code
uses: actions/checkout@v4
with:
path: 'laravel-socialite-ui'
- name: Install Pest
working-directory: ./example-app
if: ${{ matrix.tester == 'pest' }}
run: |
composer remove phpunit/phpunit --dev --no-update
composer require pestphp/pest pestphp/pest-plugin-laravel --no-update --dev
composer update --prefer-dist --no-interaction
./vendor/bin/pest --init
- name: Install Socialite UI
working-directory: ./example-app
run: |
composer require laravel-uis/socialite-ui:@dev --no-interaction --no-update
composer config repositories.laravel-socialite-ui '{"type": "path", "url": "./../laravel-socialite-ui"}' --file composer.json
composer update "laravel-uis/socialite-ui" -W --prefer-dist --no-interaction
composer update --prefer-dist --no-interaction
php artisan socialite-ui:install
- name: Install NPM dependencies
working-directory: ./example-app
run: npm i
- name: Compile assets
working-directory: ./example-app
run: npm run build
- name: Execute tests
working-directory: ./example-app
run: ./vendor/bin/${{ matrix.tester }}
env:
DB_CONNECTION: sqlite
DB_DATABASE: ":memory:"
test-vue-starter-kit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ 8.2, 8.3, 8.4 ]
laravel: [ 12 ]
tester: [ phpunit, pest ]
name: Test Vue Starter Kit Integrations - P${{ matrix.php }} – L${{ matrix.laravel }} (${{ matrix.tester }})
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pdo, pdo_sqlite
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: none
- name: Setup Project
run: |
composer create-project laravel/vue-starter-kit example-app
- name: Checkout code
uses: actions/checkout@v4
with:
path: 'laravel-socialite-ui'
- name: Install Pest
working-directory: ./example-app
if: ${{ matrix.tester == 'pest' }}
run: |
composer remove phpunit/phpunit --dev --no-update
composer require pestphp/pest pestphp/pest-plugin-laravel --no-update --dev
composer update --prefer-dist --no-interaction
./vendor/bin/pest --init
- name: Install Socialite UI
working-directory: ./example-app
run: |
composer require laravel-uis/socialite-ui:@dev --no-interaction --no-update
composer config repositories.laravel-socialite-ui '{"type": "path", "url": "./../laravel-socialite-ui"}' --file composer.json
composer update "laravel-uis/socialite-ui" -W --prefer-dist --no-interaction
composer update --prefer-dist --no-interaction
php artisan socialite-ui:install
- name: Install NPM dependencies
working-directory: ./example-app
run: npm i
- name: Compile assets
working-directory: ./example-app
run: npm run build
- name: Execute tests
working-directory: ./example-app
run: ./vendor/bin/${{ matrix.tester }}
env:
DB_CONNECTION: sqlite
DB_DATABASE: ":memory:"
test-livewire-starter-kit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ 8.2, 8.3, 8.4 ]
laravel: [ 12 ]
tester: [ phpunit, pest ]
name: Test Livewire (Volt) Starter Kit Integrations - P${{ matrix.php }} – L${{ matrix.laravel }} (${{ matrix.tester }})
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pdo, pdo_sqlite
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: none
- name: Setup Project
run: |
composer create-project laravel/livewire-starter-kit example-app
- name: Checkout code
uses: actions/checkout@v4
with:
path: 'laravel-socialite-ui'
- name: Install Pest
working-directory: ./example-app
if: ${{ matrix.tester == 'pest' }}
run: |
composer remove phpunit/phpunit --dev --no-update
composer require pestphp/pest pestphp/pest-plugin-laravel --no-update --dev
composer update --prefer-dist --no-interaction
./vendor/bin/pest --init
- name: Install Socialite UI
working-directory: ./example-app
run: |
composer require laravel-uis/socialite-ui:@dev --no-interaction --no-update
composer config repositories.laravel-socialite-ui '{"type": "path", "url": "./../laravel-socialite-ui"}' --file composer.json
composer update "laravel-uis/socialite-ui" -W --prefer-dist --no-interaction
composer update --prefer-dist --no-interaction
php artisan socialite-ui:install
- name: Install NPM dependencies
working-directory: ./example-app
run: npm i
- name: Compile assets
working-directory: ./example-app
run: npm run build
- name: Execute tests
working-directory: ./example-app
run: ./vendor/bin/${{ matrix.tester }}
env:
DB_CONNECTION: sqlite
DB_DATABASE: ":memory:"
test-livewire-classes-starter-kit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ 8.2, 8.3, 8.4 ]
laravel: [ 12 ]
tester: [ phpunit, pest ]
name: Test Livewire (Class components) Starter Kit Integrations - P${{ matrix.php }} – L${{ matrix.laravel }} (${{ matrix.tester }})
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pdo, pdo_sqlite
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: none
- name: Setup Project
run: |
composer create-project laravel/livewire-starter-kit:dev-components example-app
- name: Checkout code
uses: actions/checkout@v4
with:
path: 'laravel-socialite-ui'
- name: Install Pest
working-directory: ./example-app
if: ${{ matrix.tester == 'pest' }}
run: |
composer remove phpunit/phpunit --dev --no-update
composer require pestphp/pest pestphp/pest-plugin-laravel --no-update --dev
composer update --prefer-dist --no-interaction
./vendor/bin/pest --init
- name: Install Socialite UI
working-directory: ./example-app
run: |
composer require laravel-uis/socialite-ui:@dev --no-interaction --no-update
composer config repositories.laravel-socialite-ui '{"type": "path", "url": "./../laravel-socialite-ui"}' --file composer.json
composer update "laravel-uis/socialite-ui" -W --prefer-dist --no-interaction
composer update --prefer-dist --no-interaction
php artisan socialite-ui:install
- name: Install NPM dependencies
working-directory: ./example-app
run: npm i
- name: Compile assets
working-directory: ./example-app
run: npm run build
- name: Execute tests
working-directory: ./example-app
run: ./vendor/bin/${{ matrix.tester }}
env:
DB_CONNECTION: sqlite
DB_DATABASE: ":memory:"
check:
if: always()
needs:
- static-analysis
- tests
- test-react-starter-kit
- test-vue-starter-kit
- test-livewire-starter-kit
- test-livewire-classes-starter-kit
runs-on: ubuntu-latest
steps:
- name: Check if all jobs are passing
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}