Skip to content

run-tests

run-tests #16

Workflow file for this run

name: run-tests
on:
push:
schedule:
- cron: "0 0 * * 0"
jobs:
laravel-10-on-php-82:
name: PHP${{ matrix.php }} TB${{ matrix.testbench }} ${{ matrix.os-title }} ${{ matrix.dependency-prefer-title }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
php: [8.2]
testbench: ["^8.0"]
phpunit: ["^10.1.0"]
dependency-prefer: [prefer-stable, prefer-lowest]
phpunit-config-file: [phpunit.xml.dist]
include:
- os: ubuntu-latest
os-title: ubuntu
- os: macos-latest
os-title: macos
- os: windows-latest
os-title: win
- dependency-prefer: prefer-stable
dependency-prefer-title: stable
- dependency-prefer: prefer-lowest
dependency-prefer-title: lowest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: fileinfo
ini-values: error_reporting=E_ALL
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# find composer's cache directory - so we know which directory to cache in the next step
- name: Find composer's cache directory
id: composer-cache
shell: bash # make sure this step works on Windows - see https://github.com/actions/runner/issues/2224#issuecomment-1289533957
run: |
echo "composer_cache_dir=$(composer config cache-files-dir)">> "$GITHUB_OUTPUT"
- name: Cache composer's cache directory
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.composer_cache_dir }}
key: "[${{ matrix.os }}][php-${{ matrix.php }}][testbench-${{ matrix.testbench }}][${{ matrix.dependency-prefer }}][composer.json-${{ hashFiles('composer.json') }}]"
- name: Install dependencies
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: |
composer remove infection/infection phpstan/phpstan squizlabs/php_codesniffer --dev --no-interaction --no-update
composer require "orchestra/testbench:${{ matrix.testbench }}" "phpunit/phpunit:${{ matrix.phpunit }}" --dev --no-interaction --no-update
composer update --${{ matrix.dependency-prefer }} --prefer-dist --no-interaction --optimize-autoloader --no-progress
- name: Execute tests
run: vendor/bin/phpunit --configuration=${{ matrix.phpunit-config-file }} --no-coverage --stop-on-error --stop-on-failure
laravel-9-on-php-82:
name: PHP${{ matrix.php }} TB${{ matrix.testbench }} ${{ matrix.os-title }} ${{ matrix.dependency-prefer-title }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
php: [8.2]
testbench: ["^7.0"]
phpunit: ["^9.6"]
dependency-prefer: [prefer-stable, prefer-lowest]
phpunit-config-file: [phpunit.up-to-9.xml.dist]
include:
- os: ubuntu-latest
os-title: ubuntu
- os: macos-latest
os-title: macos
- os: windows-latest
os-title: win
- dependency-prefer: prefer-stable
dependency-prefer-title: stable
- dependency-prefer: prefer-lowest
dependency-prefer-title: lowest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: fileinfo
ini-values: error_reporting=E_ALL
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# find composer's cache directory - so we know which directory to cache in the next step
- name: Find composer's cache directory
id: composer-cache
shell: bash # make sure this step works on Windows - see https://github.com/actions/runner/issues/2224#issuecomment-1289533957
run: |
echo "composer_cache_dir=$(composer config cache-files-dir)">> "$GITHUB_OUTPUT"
- name: Cache composer's cache directory
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.composer_cache_dir }}
key: "[${{ matrix.os }}][php-${{ matrix.php }}][testbench-${{ matrix.testbench }}][${{ matrix.dependency-prefer }}][composer.json-${{ hashFiles('composer.json') }}]"
- name: Install dependencies
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: |
composer remove infection/infection phpstan/phpstan squizlabs/php_codesniffer --dev --no-interaction --no-update
composer require "orchestra/testbench:${{ matrix.testbench }}" "phpunit/phpunit:${{ matrix.phpunit }}" --dev --no-interaction --no-update
composer update --${{ matrix.dependency-prefer }} --prefer-dist --no-interaction --optimize-autoloader --no-progress
- name: Execute tests
run: vendor/bin/phpunit --configuration=${{ matrix.phpunit-config-file }} --no-coverage --stop-on-error --stop-on-failure
laravel-10-on-php-81:
name: PHP${{ matrix.php }} TB${{ matrix.testbench }} ${{ matrix.os-title }} ${{ matrix.dependency-prefer-title }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
php: [8.1]
testbench: ["^8.0"]
phpunit: ["^10.1.0"]
dependency-prefer: [prefer-stable, prefer-lowest]
phpunit-config-file: [phpunit.xml.dist]
include:
- os: ubuntu-latest
os-title: ubuntu
- os: macos-latest
os-title: macos
- os: windows-latest
os-title: win
- dependency-prefer: prefer-stable
dependency-prefer-title: stable
- dependency-prefer: prefer-lowest
dependency-prefer-title: lowest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: fileinfo
ini-values: error_reporting=E_ALL
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# find composer's cache directory - so we know which directory to cache in the next step
- name: Find composer's cache directory
id: composer-cache
shell: bash # make sure this step works on Windows - see https://github.com/actions/runner/issues/2224#issuecomment-1289533957
run: |
echo "composer_cache_dir=$(composer config cache-files-dir)">> "$GITHUB_OUTPUT"
- name: Cache composer's cache directory
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.composer_cache_dir }}
key: "[${{ matrix.os }}][php-${{ matrix.php }}][testbench-${{ matrix.testbench }}][${{ matrix.dependency-prefer }}][composer.json-${{ hashFiles('composer.json') }}]"
- name: Install dependencies
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: |
composer remove infection/infection phpstan/phpstan squizlabs/php_codesniffer --dev --no-interaction --no-update
composer require "orchestra/testbench:${{ matrix.testbench }}" "phpunit/phpunit:${{ matrix.phpunit }}" --dev --no-interaction --no-update
composer update --${{ matrix.dependency-prefer }} --prefer-dist --no-interaction --optimize-autoloader --no-progress
- name: Execute tests
run: vendor/bin/phpunit --configuration=${{ matrix.phpunit-config-file }} --no-coverage --stop-on-error --stop-on-failure
laravel-822-to-9-on-php-81:
name: PHP${{ matrix.php }} TB${{ matrix.testbench }} ${{ matrix.os-title }} ${{ matrix.dependency-prefer-title }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
php: [8.1]
testbench: ["^7.0", "^6.22"]
phpunit: ["^9.5.10"]
dependency-prefer: [prefer-stable, prefer-lowest]
phpunit-config-file: [phpunit.up-to-9.xml.dist]
include:
- os: ubuntu-latest
os-title: ubuntu
- os: macos-latest
os-title: macos
- os: windows-latest
os-title: win
- dependency-prefer: prefer-stable
dependency-prefer-title: stable
- dependency-prefer: prefer-lowest
dependency-prefer-title: lowest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: fileinfo
ini-values: error_reporting=E_ALL
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# find composer's cache directory - so we know which directory to cache in the next step
- name: Find composer's cache directory
id: composer-cache
shell: bash # make sure this step works on Windows - see https://github.com/actions/runner/issues/2224#issuecomment-1289533957
run: |
echo "composer_cache_dir=$(composer config cache-files-dir)">> "$GITHUB_OUTPUT"
- name: Cache composer's cache directory
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.composer_cache_dir }}
key: "[${{ matrix.os }}][php-${{ matrix.php }}][testbench-${{ matrix.testbench }}][${{ matrix.dependency-prefer }}][composer.json-${{ hashFiles('composer.json') }}]"
- name: Install dependencies
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: |
composer remove infection/infection phpstan/phpstan squizlabs/php_codesniffer --dev --no-interaction --no-update
composer require "orchestra/testbench:${{ matrix.testbench }}" "phpunit/phpunit:${{ matrix.phpunit }}" --dev --no-interaction --no-update
composer update --${{ matrix.dependency-prefer }} --prefer-dist --no-interaction --optimize-autoloader --no-progress
- name: Execute tests
run: vendor/bin/phpunit --configuration=${{ matrix.phpunit-config-file }} --no-coverage --stop-on-error --stop-on-failure
laravel-812-to-9-on-php-80:
name: PHP${{ matrix.php }} TB${{ matrix.testbench }} ${{ matrix.os-title }} ${{ matrix.dependency-prefer-title }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
php: ["8.0"]
testbench: ["^7.0", "^6.12"]
phpunit: ["^9.5.10"]
dependency-prefer: [prefer-stable, prefer-lowest]
phpunit-config-file: [phpunit.up-to-9.xml.dist]
include:
- os: ubuntu-latest
os-title: ubuntu
- os: macos-latest
os-title: macos
- os: windows-latest
os-title: win
- dependency-prefer: prefer-stable
dependency-prefer-title: stable
- dependency-prefer: prefer-lowest
dependency-prefer-title: lowest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: fileinfo
ini-values: error_reporting=E_ALL
coverage: none
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# find composer's cache directory - so we know which directory to cache in the next step
- name: Find composer's cache directory
id: composer-cache
shell: bash # make sure this step works on Windows - see https://github.com/actions/runner/issues/2224#issuecomment-1289533957
run: |
echo "composer_cache_dir=$(composer config cache-files-dir)">> "$GITHUB_OUTPUT"
- name: Cache composer's cache directory
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.composer_cache_dir }}
key: "[${{ matrix.os }}][php-${{ matrix.php }}][testbench-${{ matrix.testbench }}][${{ matrix.dependency-prefer }}][composer.json-${{ hashFiles('composer.json') }}]"
- name: Install dependencies
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: |
composer remove infection/infection phpstan/phpstan squizlabs/php_codesniffer --dev --no-interaction --no-update
composer require "orchestra/testbench:${{ matrix.testbench }}" "phpunit/phpunit:${{ matrix.phpunit }}" --dev --no-interaction --no-update
composer update --${{ matrix.dependency-prefer }} --prefer-dist --no-interaction --optimize-autoloader --no-progress
- name: Execute tests
run: vendor/bin/phpunit --configuration=${{ matrix.phpunit-config-file }} --no-coverage --stop-on-error --stop-on-failure