Skip to content

Fix typo in example code #119

Fix typo in example code

Fix typo in example code #119

Workflow file for this run

name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
php-coding-style:
name: Check PHP coding style
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "7.2"
extensions: mbstring, openssl, zip
tools: composer:v2, php-cs-fixer:v2
coverage: none
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Check PHP coding style
run: |
php-cs-fixer fix --dry-run --config=./.php_cs.dist --using-cache=no --diff --diff-format=udiff --show-progress=dots --verbose --no-interaction --ansi --path-mode=intersection .
phpunit:
name: Run PHPUnit tests
needs: php-coding-style
env:
CODE_COVERAGE_TOOL: none
strategy:
matrix:
os:
- ubuntu-latest
php-version:
- "5.3"
- "5.4"
- "5.5"
- "5.6"
- "7.0"
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
include:
- os: windows-latest
php-version: "5.5"
- os: windows-latest
php-version: "7.4"
runs-on: ${{ matrix.os }}
steps:
- name: Set code coverage
if: startsWith(matrix.os, 'ubuntu') && matrix.php-version == '7.2'
run: |
echo "CODE_COVERAGE_TOOL=xdebug" >> $GITHUB_ENV
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2
extensions: pdo_sqlite
coverage: ${{ env.CODE_COVERAGE_TOOL }}
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install Composer dependencies
if: matrix.php-version != '8.2'
run: composer --ansi --no-interaction --no-progress --optimize-autoloader update
- name: Install Composer dependencies (ignore platform reqs)
if: matrix.php-version == '8.2'
run: composer --ansi --no-interaction --no-progress --optimize-autoloader --ignore-platform-reqs update
- name: Run PHPUnit (without code coverage)
if: ${{ env.CODE_COVERAGE_TOOL == 'none' }}
run: composer --ansi --no-interaction run-script test
- name: Run PHPUnit (with code coverage)
if: ${{ env.CODE_COVERAGE_TOOL != 'none' }}
run: composer --ansi --no-interaction run-script test -- --coverage-clover coverage-clover.xml
- name: Download Coveralls
if: ${{ env.CODE_COVERAGE_TOOL != 'none' }}
run: curl -sSLf -o php-coveralls.phar https://github.com/php-coveralls/php-coveralls/releases/latest/download/php-coveralls.phar
- name: Upload Coveralls data
if: ${{ env.CODE_COVERAGE_TOOL != 'none' }}
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >
php php-coveralls.phar
--coverage_clover=coverage-clover.xml --json_path=coveralls-upload.json --ansi --no-interaction -vvv
- name: Download Scrutinizer
if: ${{ env.CODE_COVERAGE_TOOL != 'none' }}
run: curl -sSLf -o ocular.phar https://scrutinizer-ci.com/ocular.phar
- name: Upload Scrutinizer data
if: ${{ env.CODE_COVERAGE_TOOL != 'none' }}
run: >
php ocular.phar code-coverage:upload
--format=php-clover --ansi --no-interaction
coverage-clover.xml