Skip to content
Snippets Groups Projects
Unverified Commit dcc6fad9 authored by David Buchmann's avatar David Buchmann Committed by GitHub
Browse files

Merge pull request #19 from GrahamCampbell/patch-2

Allow PHP 8
parents c24dd041 9a91404a
No related branches found
No related tags found
No related merge requests found
spec/ export-ignore
tests/ export-ignore
.github/ export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.php_cs export-ignore
.scrutinizer.yml export-ignore
.styleci.yml export-ignore
.travis.yml export-ignore
CONTRIBUTING export-ignore
phpspec.yml.ci export-ignore
phpspec.yml.dist export-ignore
phpunit.xml.dist export-ignore
name: tests
on:
push:
pull_request:
jobs:
tests:
name: PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.1', '7.2', '7.3', '7.4', '8.0']
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl
tools: composer:v2
coverage: none
- name: Install PHP 7 dependencies
run: composer update --prefer-dist --no-interaction --no-progress
if: "matrix.php != '8.0'"
- name: Install PHP 8 dependencies
run: composer update --prefer-dist --no-interaction --no-progress --ignore-platform-reqs
if: "matrix.php == '8.0'"
- name: Execute tests
run: composer test
coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
extensions: curl
tools: composer:v2
coverage: xdebug
- name: Install dependencies
run: composer update --prefer-dist --no-interaction --no-progress
- name: Execute tests
run: composer test-ci
- name: Upload coverage
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml
language: php
cache:
directories:
- $HOME/.composer/cache
php:
- 7.1
- 7.2
- 7.3
- 7.4
env:
global:
- TEST_COMMAND="composer test"
branches:
except:
- /^analysis-.*$/
matrix:
fast_finish: true
include:
- php: 7.1
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci"
before_install:
- travis_retry composer self-update
install:
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction
script:
- $TEST_COMMAND
after_success:
- if [[ "$COVERAGE" = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [[ "$COVERAGE" = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi
......@@ -15,11 +15,11 @@
}
],
"require": {
"php" : "^7.1"
"php" : "^7.1 || ^8.0"
},
"require-dev": {
"phpspec/phpspec": "^2.4",
"henrikbjorn/phpspec-code-coverage" : "^1.0"
"friends-of-phpspec/phpspec-code-coverage" : "^4.3.2",
"phpspec/phpspec": "^5.1.2 || ^6.2"
},
"autoload": {
"psr-4": {
......
......@@ -4,7 +4,7 @@ suites:
psr4_prefix: Http\Promise
formatter.name: pretty
extensions:
- PhpSpec\Extension\CodeCoverageExtension
FriendsOfPhpSpec\PhpSpec\CodeCoverage\CodeCoverageExtension: ~
code_coverage:
format: clover
output: build/coverage.xml
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment