mirror of
https://github.com/pestphp/pest.git
synced 2026-09-05 06:13:35 +02:00
wdq
This commit is contained in:
@@ -75,3 +75,70 @@ jobs:
|
||||
|
||||
- name: Integration Tests
|
||||
run: composer test:integration
|
||||
|
||||
tia:
|
||||
if: github.event_name != 'schedule' || github.repository == 'pestphp/pest'
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
php: ['8.4']
|
||||
coverage: [xdebug]
|
||||
|
||||
name: TIA - PHP ${{ matrix.php }} - ${{ matrix.coverage }} - ubuntu-latest
|
||||
|
||||
# The `tests` matrix runs with `coverage: none`, which leaves half of TIA
|
||||
# untested: recording a dependency graph needs a coverage driver, and the
|
||||
# scenarios fall back to a seeded graph without one. This job is the other
|
||||
# half — and the only place the driver-specific recording code runs at all.
|
||||
#
|
||||
# Off for *this* suite, on for the subprocesses each scenario spawns (see
|
||||
# `Project::pestWithEnvironment()`): they are the ones that record, and
|
||||
# collecting Pest's own ~2000 tests under xdebug costs more than every
|
||||
# scenario put together.
|
||||
env:
|
||||
XDEBUG_MODE: 'off'
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
tools: composer:v2
|
||||
coverage: ${{ matrix.coverage }}
|
||||
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@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v5
|
||||
with:
|
||||
path: ${{ steps.composer-cache.outputs.dir }}
|
||||
key: ubuntu-latest-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json', '**/composer.lock') }}
|
||||
restore-keys: |
|
||||
ubuntu-latest-php-${{ matrix.php }}-composer-
|
||||
|
||||
- name: Install PHP dependencies
|
||||
shell: bash
|
||||
env:
|
||||
COMPOSER_ROOT_VERSION: 5.x-dev
|
||||
run: composer update --prefer-stable --no-interaction --no-progress --ansi
|
||||
|
||||
# A missing driver would not fail these rows — they fall back to a seeded
|
||||
# graph and stay green — so the job has to check for itself that the thing
|
||||
# it exists to exercise is present, and that a scenario subprocess gets it.
|
||||
- name: Assert xdebug is present, and reaches a scenario subprocess
|
||||
run: |
|
||||
php -r 'exit(extension_loaded("xdebug") ? 0 : 1);'
|
||||
XDEBUG_MODE=coverage php -r 'exit(in_array("coverage", (array) xdebug_info("mode"), true) ? 0 : 1);'
|
||||
|
||||
- name: TIA Scenario Tests
|
||||
run: composer test:tia
|
||||
|
||||
Reference in New Issue
Block a user