Skip to content

Update phpunit/phpunit requirement from ^5.7 || ^6.0 || ^9.3 to ^11.3.6 #9

Update phpunit/phpunit requirement from ^5.7 || ^6.0 || ^9.3 to ^11.3.6

Update phpunit/phpunit requirement from ^5.7 || ^6.0 || ^9.3 to ^11.3.6 #9

# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
name: "CI"
on:
pull_request:
push:
branches:
- "master"
env:
COMPOSER_ROOT_VERSION: "1.99.99"
jobs:
lint:
name: "Lint"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- uses: "shivammathur/setup-php@v2"
with:
php-version: "7.4"
coverage: "none"
ini-values: "memory_limit=-1"
tools: "composer:v2"
- uses: "ramsey/composer-install@v1"
- name: "Lint the PHP source code"
run: "./vendor/bin/parallel-lint src test"
coding-standards:
name: "Coding Standards"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- uses: "shivammathur/setup-php@v2"
with:
php-version: "7.4"
coverage: "none"
ini-values: "memory_limit=-1"
tools: "composer:v2"
- uses: "ramsey/composer-install@v1"
- name: "Check coding standards"
run: "./vendor/bin/phpcs src --standard=psr2 -sp --colors"
unit-tests:
name: "Unit Tests"
runs-on: "ubuntu-latest"
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
php-version:
- "5.6"
- "7.0"
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
experimental:
- false
include:
- php-version: "8.1"
experimental: true
composer-options: "--ignore-platform-reqs"
steps:
- uses: "actions/checkout@v2"
- uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
coverage: "pcov"
ini-values: "memory_limit=-1"
tools: "composer:v2"
- name: "Prepare for tests"
run: "mkdir -p build/logs"
- uses: "ramsey/composer-install@v1"
with:
composer-options: "${{ matrix.composer-options }}"
- name: "Run unit tests"
run: "./vendor/bin/phpunit --colors=always --coverage-clover build/logs/clover.xml"
- name: "Publish coverage report to Coveralls"
continue-on-error: true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global --ansi require php-coveralls/php-coveralls
php-coveralls --ansi -vv --coverage_clover=build/logs/clover.xml