up: update some for run in php8.4 #22
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: Unit-tests | |
on: | |
pull_request: | |
push: | |
paths: | |
- '**.php' | |
- 'composer.json' | |
- '**.yml' | |
jobs: | |
test: | |
name: Test on php ${{ matrix.php}} | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: true | |
matrix: | |
php: [8.2, 8.1, ] # | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# usage refer https://github.com/shivammathur/setup-php | |
- name: Setup PHP | |
timeout-minutes: 5 | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php}} | |
tools: pecl, php-cs-fixer, phpunit | |
extensions: mbstring, dom, fileinfo, openssl # , swoole-4.4.19 #optional, setup extensions | |
ini-values: post_max_size=56M, short_open_tag=On #optional, setup php.ini configuration | |
coverage: xdebug #optional, setup coverage driver: xdebug, none | |
- name: Install dependencies | |
run: composer install --no-progress --no-suggest | |
- name: Run test suite | |
run: | | |
phpunit --coverage-clover ./test/clover.xml | |
- name: Coveralls Parallel | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.github_token }} | |
flag-name: run-${{ matrix.php }} | |
path-to-lcov: ./test/clover.xml | |
parallel: true | |
finish: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.github_token }} | |
parallel-finished: true |