Release 2.5 #36
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: "CI" | |
on: | |
pull_request: | |
push: | |
jobs: | |
tests: | |
runs-on: 'macos-latest' | |
continue-on-error: true | |
strategy: | |
fail-fast: true | |
matrix: | |
php-version: | |
- '5.6' | |
- '7.0' | |
- '7.1' | |
- '7.2' | |
- '7.3' | |
- '7.4' | |
- '8.0' | |
- '8.1' | |
- '8.2' | |
- '8.3' | |
- '8.4' | |
steps: | |
- name: "Checkout code" | |
uses: actions/checkout@v4 | |
- run: | | |
set -xe | |
# Related issue: https://github.com/actions/setup-python/issues/577 | |
# Unlink and re-link to prevent errors when GitHub macOS runner images install Node outside of brew. | |
brew list -1 | grep node | while read formula; do brew unlink $formula; brew link --overwrite $formula; done | |
# Unlink and re-link to prevent errors when GitHub macOS runner images install Python outside of brew. | |
brew list -1 | grep python | while read formula; do brew unlink $formula; brew link --overwrite $formula; done | |
brew --version | |
brew tap shivammathur/php | |
brew update | |
brew install shivammathur/php/php@${{ matrix.php-version }} | |
./phpswitch.sh ${{ matrix.php-version }} -s | |
switched=$(php -v | grep -e '^PHP' | cut -d' ' -f2 | cut -d. -f1,2) | |
if [ "${{ matrix.php-version }}" != "$switched" ]; then | |
echo "Expected ${{ matrix.php-version }} got $switched" | |
exit 1 | |
fi |