Skip to content

Tests

Tests #528

Workflow file for this run

name: Tests
on:
push:
pull_request:
schedule:
- cron: '0 0 */10 * *'
jobs:
tests:
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: true
matrix:
php: [8.1]
laravel: [^10.0]
operating-system:
- "macos-latest"
- "ubuntu-latest"
- "windows-latest"
steps:
- name: "Configure Git (for Windows)"
if: ${{ matrix.operating-system == 'windows-latest' }}
shell: "bash"
run: |
git config --system core.autocrlf false
git config --system core.eol lf
- 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, fileinfo
coverage: none
- name: "Lock Laravel contracts to ${{ matrix.laravel }}"
run: |
composer require "illuminate/contracts:${{ matrix.laravel }}" --no-interaction --no-update
- name: "Install dependencies (Composer)"
uses: ramsey/composer-install@v3
with:
dependency-versions: "highest"
- name: Execute tests
run: vendor/bin/phpunit --verbose
tests-old:
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: true
matrix:
php: [8.0]
laravel: [^8.53, ^9.36]
operating-system:
- "macos-latest"
- "ubuntu-latest"
- "windows-latest"
steps:
- name: "Configure Git (for Windows)"
if: ${{ matrix.operating-system == 'windows-latest' }}
shell: "bash"
run: |
git config --system core.autocrlf false
git config --system core.eol lf
- 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, fileinfo
coverage: none
- name: "Lock Laravel contracts to ${{ matrix.laravel }}"
run: |
composer require "illuminate/contracts:${{ matrix.laravel }}" --no-interaction --no-update
- name: "Install dependencies (Composer)"
uses: ramsey/composer-install@v3
with:
dependency-versions: "highest"
- name: Execute tests
run: vendor/bin/phpunit --verbose