Skip to content

Try cache v3 for GH actions instead. #69

Try cache v3 for GH actions instead.

Try cache v3 for GH actions instead. #69

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest]
php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: openssl,mbstring,gmp
coverage: xdebug
- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Install Composer dependencies
if: ${{ matrix.php-versions != '8.1' }}
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Install Composer dependencies (8.1)
if: ${{ matrix.php-versions == '8.1' }}
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader --ignore-platform-reqs
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Run Specs
run: composer run-script test