Skip to content

Update readthedocs build.os #286

Update readthedocs build.os

Update readthedocs build.os #286

Workflow file for this run

name: tests
on: [ push, pull_request ]
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ 'ubuntu-latest', 'windows-latest', 'macos-latest' ]
php-versions: [ '8.1', '8.2', '8.3', '8.4' ]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug
tools: php-cs-fixer
- name: Setup problem matchers for PHPUnit
shell: bash
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- 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: ${{ runner.os }}-${{ matrix.php-versions }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-${{ matrix.php-versions }}-composer-
- name: Install Composer dependencies
shell: bash
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Test with PHPUnit
if: matrix.php-versions != '8.4' || matrix.operating-system != 'ubuntu-latest'
env:
XDEBUG_MODE: coverage
shell: bash
run: vendor/bin/phpunit --testdox -- tests
- name: Test with PHPUnit (coverage)
if: matrix.php-versions == '8.4' && matrix.operating-system == 'ubuntu-latest'
env:
XDEBUG_MODE: coverage
shell: bash
run: vendor/bin/phpunit --testdox --coverage-clover coverage.xml -- tests
- name: Codecov
if: matrix.php-versions == '8.4' && matrix.operating-system == 'ubuntu-latest'
uses: codecov/codecov-action@v5