Skip to content

Use only needed PHP extensions in CI #87

Use only needed PHP extensions in CI

Use only needed PHP extensions in CI #87

Workflow file for this run

name: CI
on:
- pull_request
- push
jobs:
analyse:
runs-on: ubuntu-latest
env:
PHP_CS_FIXER_IGNORE_ENV: 1
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: none
coverage: none
- name: Install dependencies
run: composer update --no-progress
- name: Analyse
run: composer analyse
test:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
php-version: '7.4'
composer_flags: '--prefer-lowest'
- os: ubuntu-latest
php-version: '7.4'
- os: ubuntu-latest
php-version: '8.0'
- os: ubuntu-latest
php-version: '8.1'
- os: macos-latest
php-version: '8.2'
- os: ubuntu-latest
php-version: '8.2'
- os: ubuntu-latest
php-version: '8.3'
name: PHP ${{ matrix.php-version }} (${{ matrix.os }}) ${{ matrix.composer_flags }}
runs-on: ${{ matrix.os }}
env:
COMPOSER_PROCESS_TIMEOUT: 300
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: none
coverage: none
- name: Get Composer data directory
id: composer-data
run: echo '::set-output name=dir::$(composer config data-dir)'
- name: Cache Composer data
uses: actions/cache@v1
with:
path: ${{ steps.composer-data.outputs.dir }}
key: ${{ runner.os }}-composer-data-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-data-
- name: Get Composer cache directory
id: composer-cache
run: echo '::set-output name=dir::$(composer config cache-files-dir)'
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-cache-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-cache-
- name: Install dependencies
run: composer update --no-progress ${{ matrix.composer_flags }}
- name: Test
run: composer test