Skip to content

FIX: Temporary fix to fix the issue with unlinking previous version a… #82

FIX: Temporary fix to fix the issue with unlinking previous version a…

FIX: Temporary fix to fix the issue with unlinking previous version a… #82

Workflow file for this run

name: 'macOS'
on:
push:
branches: [ 'master' ]
pull_request:
branches: [ 'master' ]
jobs:
tests:
continue-on-error: false
strategy:
fail-fast: true
matrix:
os: [ 'macos-14', 'macos-13' ]
php-version: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
runs-on: ${{ matrix.os }}
steps:
- name: 'PHP version check'
uses: 'actions/checkout@v3'
- run: |
brew --version
brew tap shivammathur/php
brew install shivammathur/php/php@${{ matrix.php-version }}
./brew-php-switcher.sh ${{ matrix.php-version }}
version=$(php -v | grep -e '^PHP' | cut -d ' ' -f2 | cut -d '.' -f1,2)
if [[ "${{ matrix.php-version }}" != "${version}" ]]; then
echo "Expected ${{ matrix.php-version }} got ${version}"
exit 1
else
echo "PHP CLI version was properly switched to ${{ matrix.php-version }}"
fi
service="php@${version}"
if [[ "${version}" == "8.3" ]]; then
service="php"
fi
brew services start "${service}"
status=$(brew services list | grep "${service}" | grep "started")
if [[ -z "${status}" ]]; then
echo "PHP-FPM service with version ${version} is not started"
exit 1
else
echo "PHP-FPM service with version ${version} was started properly"
fi