Skip to content

Bump api-clients/test-utilities from 3.0.1 to 5.1.0 #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php declare(strict_types=1);

use ApiClients\Tools\CsFixerConfig\PhpCsFixerConfig;
use PhpCsFixer\Config;

return (function (): Config
{
$paths = [
__DIR__ . DIRECTORY_SEPARATOR . 'src',
__DIR__ . DIRECTORY_SEPARATOR . 'tests',
];

return PhpCsFixerConfig::create()
->setFinder(
PhpCsFixer\Finder::create()
->in($paths)
->append($paths)
)
->setUsingCache(false)
;
})();
47 changes: 18 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,51 @@
language: php
sudo: false

## Cache composer bits
cache:
directories:
- $HOME/.composer/cache

## PHP versions we test against
php:
- 7.0
- 7.1
- nightly

## Environment variables
env:
- coverage=true
- $HOME/.composer/cache/files

## Build matrix for lowest and highest possible targets
matrix:
include:
- php: 7.0
- php: 7.2
env:
- dependencies=lowest
- coverage=false
- php: 7.1
- qaExtended=true
- dropPlatform=false
- php: nightly
env:
- dropPlatform=false
- php: 7.2
env:
- dependencies=lowest
- coverage=false
- dropPlatform=false
- php: nightly
env:
- dependencies=lowest
- coverage=false
- php: 7.0
env:
- dependencies=highest
- coverage=false
- php: 7.1
- dropPlatform=false
- php: 7.2
env:
- dependencies=highest
- coverage=false
- dropPlatform=false
- php: nightly
env:
- dependencies=highest
- coverage=false
- dropPlatform=false

## Install or update dependencies
install:
- composer validate
- if [ "$coverage" = "false" ]; then phpenv config-rm xdebug.ini || :; fi;
- if [ -z "$dropPlatform" ]; then composer config --unset platform.php; fi;
- if [ -z "$qaExtended" ]; then phpenv config-rm xdebug.ini || :; fi;
- if [ -z "$dependencies" ]; then composer install --prefer-dist; fi;
- if [ "$dependencies" = "lowest" ]; then composer update --prefer-lowest --prefer-dist -n; fi;
- if [ "$dependencies" = "highest" ]; then composer update --prefer-dist -n; fi;
- composer show

## Run the actual test
script:
- if [ "$coverage" = "false" ]; then make ci; fi;
- if [ "$coverage" = "true" ]; then make ci-with-coverage; fi;
- if [ -z "$qaExtended" ]; then make ci; fi;
- if [ "$qaExtended" = "true" ]; then make ci-extended; fi;

## Gather coverage and set it to coverage servers
after_script: make ci-coverage
after_script: if [ "$qaExtended" = "true" ]; then make ci-coverage; fi;
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ all-coverage:
ci:
composer run-script qa-ci --timeout=0

ci-with-coverage:
composer run-script qa-ci-coverage --timeout=0
ci-extended:
composer run-script qa-ci-extended --timeout=0

contrib:
composer run-script qa-contrib --timeout=0
Expand All @@ -19,6 +19,9 @@ init:
cs:
composer cs

cs-fix:
composer cs-fix

unit:
composer run-script unit --timeout=0

Expand Down
17 changes: 6 additions & 11 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,13 @@ clone_folder: c:\projects\php-project-workspace
environment:
matrix:
- dependencies: lowest
php_ver_target: 7.0
- dependencies: lowest
php_ver_target: 7.1
- dependencies: current
php_ver_target: 7.0
php_ver_target: 7.2
- dependencies: current
php_ver_target: 7.1
- dependencies: highest
php_ver_target: 7.0
php_ver_target: 7.2
- dependencies: highest
php_ver_target: 7.1
php_ver_target: 7.2

## Cache composer bits
## Cache composer file
cache:
- '%LOCALAPPDATA%\Composer\files -> composer.lock'

Expand All @@ -33,7 +27,7 @@ init:
## Install PHP and composer, and run the appropriate composer command
install:
- IF EXIST c:\tools\php (SET PHP=0)
- ps: appveyor-retry cinst -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $Env:php_ver_target | Select-Object -first 1) -replace '[php|]','')
- ps: appveyor-retry cinst --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php_ver_target | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
- cd c:\tools\php
- IF %PHP%==1 copy php.ini-production php.ini /Y
- IF %PHP%==1 echo date.timezone="UTC" >> php.ini
Expand All @@ -44,6 +38,7 @@ install:
- IF %PHP%==1 echo @php %%~dp0composer.phar %%* > composer.bat
- appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar
- cd c:\projects\php-project-workspace
- composer config --unset platform.php
- IF %dependencies%==lowest appveyor-retry composer update --prefer-lowest --no-progress --profile -n
- IF %dependencies%==current appveyor-retry composer install --no-progress --profile
- IF %dependencies%==highest appveyor-retry composer update --no-progress --profile -n
Expand Down
19 changes: 13 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
}
],
"require": {
"php": "^7.0",
"php": "^7.2",
"api-clients/middleware": "^4.0",
"api-clients/psr7-http-status-exceptions": "^1.0",
"clue/buzz-react": "^2.0 || ^1.1"
},
"require-dev": {
"api-clients/test-utilities": "^3.0.1"
"api-clients/test-utilities": "^5.1.0"
},
"autoload": {
"psr-4": {
Expand All @@ -28,13 +28,20 @@
}
},
"config": {
"sort-packages": true
"sort-packages": true,
"platform": {
"php": "7.2"
}
},
"scripts": {
"ensure-installed": "composer install --ansi -n -q",
"cs": [
"@ensure-installed",
"phpcs --standard=PSR2 src/"
"php-cs-fixer fix --config=.php_cs --ansi --dry-run --diff --verbose --allow-risky=yes --show-progress=estimating"
],
"cs-fix": [
"@ensure-installed",
"php-cs-fixer fix --config=.php_cs --ansi --verbose --allow-risky=yes --show-progress=estimating"
],
"unit": [
"@ensure-installed",
Expand Down Expand Up @@ -64,9 +71,9 @@
"@unit"
],
"qa-ci": [
"@qa-all"
"@unit"
],
"qa-ci-coverage": [
"qa-ci-extended": [
"@qa-all-coverage"
],
"qa-ci-windows": [
Expand Down
Loading