Skip to content

only support to the 8.2 higher #55

only support to the 8.2 higher

only support to the 8.2 higher #55

Workflow file for this run

# https://github.com/marketplace/actions/setup-php-action
#`uses' attribute must be a path, a Docker image, or owner/repo@ref
name: "Test and Deploy"
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
php: ["8.2", "8.3", "8.4"]
env:
tools: composer, phpstan, infection
extensions: bcmath, bz2, curl, gd, intl, ldap, mbstring, opcache, readline, sqlite3, tidy, xml, xsl, zip zlib pcre
ini-values: memory_limit=-1,default_charset='UTF-8'
name: PHP ${{ matrix.php }} test on ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: zlib,pcre,opcache,imagick, swoole
ini-values: ${{ env.ini-values }}
coverage: pcov
tools: ${{ env.tools }}
env:
fail-fast: true
- name: Know Me !
run: lsb_release -a && uname -a && echo $(pwd) && php -v && php -m
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Install dependencies
run: composer install --prefer-dist --no-progress --ignore-platform-req=php
- name: Copy phpunit and phpcs files
run: cp phpcs.xml.dist phpcs.xml && cp phpunit.xml.dist phpunit.xml
- name: Run ch-check
run: composer run-script cs-check
- name: Run cs-fix
run: composer run-script cs-fix
- name: PHPUnit Test
run: composer run-script test