mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
73 lines
2.1 KiB
YAML
73 lines
2.1 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [4.x]
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: tests-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
tests:
|
|
if: github.event_name != 'schedule' || github.repository == 'pestphp/pest'
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest] # windows-latest
|
|
symfony: ['7.4', '8.0']
|
|
php: ['8.3', '8.4', '8.5']
|
|
dependency_version: [prefer-stable]
|
|
exclude:
|
|
- php: '8.3'
|
|
symfony: '8.0'
|
|
|
|
name: PHP ${{ matrix.php }} - Symfony ^${{ matrix.symfony }} - ${{ matrix.os }} - ${{ matrix.dependency_version }}
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php }}
|
|
tools: composer:v2
|
|
coverage: none
|
|
extensions: sockets
|
|
|
|
- name: Get Composer cache directory
|
|
id: composer-cache
|
|
shell: bash
|
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Cache Composer dependencies
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ${{ steps.composer-cache.outputs.dir }}
|
|
key: ${{ matrix.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles('**/composer.json') }}
|
|
restore-keys: |
|
|
${{ matrix.os }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-
|
|
${{ matrix.os }}-php-${{ matrix.php }}-composer-
|
|
|
|
- name: Setup Problem Matches
|
|
run: |
|
|
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
|
|
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
|
|
|
|
- name: Install PHP dependencies
|
|
shell: bash
|
|
run: composer update --${{ matrix.dependency_version }} --no-interaction --no-progress --ansi --with="symfony/console:^${{ matrix.symfony }}"
|
|
|
|
- name: Unit Tests
|
|
run: composer test:unit
|
|
|
|
- name: Parallel Tests
|
|
run: composer test:parallel
|
|
|
|
- name: Integration Tests
|
|
run: composer test:integration
|