Skip to content

Commit 6db507a

Browse files
authored
Cleaned up some tests & prepare 3.0 (#51)
* Cleaned up some tests * Adding github actions * continue on error * Typo * minor * Remove old files * Update changelog * Typo =)
1 parent e6d8cd4 commit 6db507a

File tree

10 files changed

+91
-86
lines changed

10 files changed

+91
-86
lines changed

Diff for: .github/workflows/.editorconfig

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[*.yml]
2+
indent_size = 2

Diff for: .github/workflows/ci.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
continue-on-error: true
14+
strategy:
15+
max-parallel: 10
16+
matrix:
17+
batch:
18+
- { suite: "curl", php: '7.4', package: "php-http/curl-client:dev-master zendframework/zend-diactoros" }
19+
- { suite: "Socket", php: '7.4', package: "php-http/socket-client:dev-master php-http/client-common" }
20+
- { suite: "Guzzle5", php: '7.1', package: "php-http/guzzle5-adapter:dev-master" }
21+
- { suite: "Guzzle6", php: '7.4', package: "php-http/guzzle6-adapter:dev-master" }
22+
- { suite: "Guzzle", php: '7.4', package: "guzzlehttp/guzzle:dev-master" }
23+
- { suite: "Guzzle", php: '7.4', package: "guzzlehttp/guzzle:dev-master phpunit/phpunit:^8.5.8" }
24+
- { suite: "Guzzle", php: '7.4', package: "guzzlehttp/guzzle:dev-master phpunit/phpunit:^7.5.20" }
25+
- { suite: "Buzz", php: '7.4', package: "kriswallsmith/buzz:dev-master" }
26+
27+
steps:
28+
- name: Set up PHP
29+
uses: shivammathur/setup-php@v2
30+
with:
31+
php-version: ${{ matrix.batch.php }}
32+
coverage: none
33+
tools: composer:v2
34+
35+
- name: Checkout code
36+
uses: actions/checkout@v2
37+
38+
- name: Download dependencies
39+
run: |
40+
composer require ${{ matrix.batch.package }} --no-update
41+
composer update --prefer-source --no-interaction
42+
43+
- name: Start test server
44+
shell: bash
45+
run: bin/http_test_server > /dev/null 2>&1 &
46+
47+
- name: Run tests
48+
run: ./vendor/bin/phpunit --testsuite ${{ matrix.batch.suite }}

Diff for: .github/workflows/static.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Static analysis
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
php-cs-fixer:
11+
name: PHP-CS-Fixer
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v2
17+
18+
- name: PHP-CS-Fixer
19+
uses: docker://oskarstark/php-cs-fixer-ga:2.16.4
20+
with:
21+
args: --dry-run --diff-format udiff

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@
44
/phpspec.yml
55
/phpunit.xml
66
/vendor/
7+
.phpunit.result.cache
8+
.php_cs.cache

Diff for: .php_cs

-13
This file was deleted.

Diff for: .php_cs.dist

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
$config = PhpCsFixer\Config::create()
4+
->setRiskyAllowed(true)
5+
->setRules([
6+
'@PSR2' => true,
7+
])
8+
->setFinder(
9+
PhpCsFixer\Finder::create()
10+
->in(__DIR__.'/src')
11+
->name('*.php')
12+
)
13+
;
14+
15+
return $config;

Diff for: .styleci.yml

-11
This file was deleted.

Diff for: .travis.yml

-48
This file was deleted.

Diff for: CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
77
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
88

99

10-
## [3.0.0] - Unreleased
10+
## [3.0.0] - 2020-10-01
1111

1212
- Only support HTTPlug 2.0 and PSR-18
1313
- HTTPlug 2.0 is now optional (only require it if you need to test async)
1414
- HttpClientTest now relies only on PSR-18 (no need for HTTPlug)
15+
- Added support for PHPUnit 8 and 9
1516

1617
## [2.0.1] - 2018-12-27
1718

Diff for: phpunit.xml.dist

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit colors="true" bootstrap="vendor/autoload.php">
33
<testsuites>
4-
<testsuite name="Artax">
5-
<directory>vendor/php-http/artax-adapter/tests</directory>
6-
</testsuite>
74
<testsuite name="curl">
85
<directory>vendor/php-http/curl-client/tests</directory>
96
</testsuite>
@@ -20,16 +17,7 @@
2017
<directory>vendor/php-http/guzzle6-adapter/tests</directory>
2118
</testsuite>
2219
<testsuite name="Buzz">
23-
<directory>vendor/php-http/buzz-adapter/tests</directory>
24-
</testsuite>
25-
<testsuite name="React">
26-
<directory>vendor/php-http/react-adapter/tests</directory>
27-
</testsuite>
28-
<testsuite name="CakePHP">
29-
<directory>vendor/php-http/cakephp-adapter/tests</directory>
30-
</testsuite>
31-
<testsuite name="Zend">
32-
<directory>vendor/php-http/zend-adapter/tests</directory>
20+
<directory>vendor/kriswallsmith/buzz/tests</directory>
3321
</testsuite>
3422
</testsuites>
3523
<php>

0 commit comments

Comments
 (0)