chore(deps-dev): update friendsofphp/php-cs-fixer requirement #1228
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
pull_request: | |
push: | |
schedule: | |
# Run Monday morning at 3 o'clock | |
# ┌───────────── minute (0 - 59) | |
# │ ┌───────────── hour (0 - 23) | |
# │ │ ┌───────────── day of the month (1 - 31) | |
# │ │ │ ┌───────────── month (1 - 12) | |
# │ │ │ │ ┌───────────── day of the week (0 - 6) | |
# │ │ │ │ │ | |
# │ │ │ │ │ | |
# │ │ │ │ │ | |
- cron: 0 3 * * 1 | |
workflow_dispatch: | |
jobs: | |
supported-versions-matrix: | |
name: Supported Versions Matrix | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.supported-versions-matrix.outputs.version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- id: supported-versions-matrix | |
uses: WyriHaximus/github-action-composer-php-versions-in-range@v1 | |
tests: | |
needs: | |
- supported-versions-matrix | |
strategy: | |
fail-fast: false | |
matrix: | |
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }} | |
laravel: [^6.0, ^8.0, ^9.0, ^10.0] | |
lazy_types: ['false', 'true'] | |
exclude: | |
- php: 7.4 | |
laravel: ^9.0 | |
- php: 8.0 | |
laravel: ^6.0 | |
- php: 8.1 | |
laravel: ^6.0 | |
- php: 8.2 | |
laravel: ^6.0 | |
- php: 8.0 | |
laravel: ^10.0 | |
- php: 7.4 | |
laravel: ^10.0 | |
name: P=${{ matrix.php }} L=${{ matrix.laravel }} Lazy types=${{ matrix.lazy_types }} | |
runs-on: ubuntu-latest | |
env: | |
COMPOSER_NO_INTERACTION: 1 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
coverage: none | |
extensions: pdo_sqlite | |
# Due to version incompatibility with older Laravels we test, we remove it | |
- run: composer remove --dev nunomaduro/larastan --no-update | |
- run: composer remove --dev friendsofphp/php-cs-fixer --no-update | |
- run: composer remove --dev laravel/legacy-factories --no-update | |
if: (matrix.laravel == '^6.0' || matrix.laravel == '^7.0') | |
- run: composer require illuminate/contracts:${{ matrix.laravel }} --no-update | |
- name: Get composer cache directory | |
id: composercache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composercache.outputs.dir }} | |
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer- | |
- run: composer update --prefer-dist --no-progress | |
- name: Enable lazy types conditionally | |
run: echo "TESTS_ENABLE_LAZYLOAD_TYPES=1" >> $GITHUB_ENV | |
if: matrix.lazy_types == 'true' | |
- name: Run tests | |
run: composer tests |