PHP 8.4 fixes #81
This file contains hidden or 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: [push, pull_request] | |
jobs: | |
ci: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4'] | |
name: PHP ${{ matrix.php }} | |
services: | |
mysql: | |
image: mysql:8 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
MYSQL_DATABASE: phproject | |
ports: | |
- 3306/tcp | |
options: >- | |
--health-cmd "mysqladmin ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 3 | |
steps: | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
tools: phpunit:8.5 | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
env: | |
cache-name: cache-composer | |
with: | |
path: ~/.composer | |
key: ${{ runner.os }}-ci-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-ci-${{ env.cache-name }}- | |
${{ runner.os }}-ci- | |
${{ runner.os }}- | |
- name: Syntax check | |
run: if find . -name "*.php" ! -path "./vendor/*" -exec php -l {} 2>&1 \; | grep "syntax error, unexpected"; then exit 1; fi | |
- name: Composer | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- run: vendor/bin/phpcs | |
- name: Install Phproject | |
run: php install.php --site-name=Test --site-url=http://localhost/ --timezone=America/Phoenix --admin-username=test [email protected] --admin-password=secret --db-host=127.0.0.1 --db-port=${{ job.services.mysql.ports['3306'] }} --db-user=root |