Skip to content

Lock file maintenance #4185

Lock file maintenance

Lock file maintenance #4185

Workflow file for this run

name: Test
on: [ push, pull_request ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php-version:
- '8.4'
- '8.5'
dependencies:
- 'locked'
- 'latest'
- 'lowest'
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
with:
php-version: ${{ matrix.php-version }}
# TODO: Remove next lint to enable memcached after that issue is fixed: https://github.com/php-memcached-dev/php-memcached/issues/477
extensions: :memcached
coverage: none
- name: Cache composer dependencies
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
with:
path: ~/.cache/composer
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies (locked)
if: ${{ matrix.dependencies == 'locked' }}
run: composer install --no-interaction
- name: Install dependencies (latest)
if: ${{ matrix.dependencies == 'latest' }}
run: composer update --no-interaction
- name: Install dependencies (lowest)
if: ${{ matrix.dependencies == 'lowest' }}
run: composer update --prefer-lowest --no-interaction
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Test with PHPUnit
run: make unit
- name: Test examples
run: make check-example