Skip to content

Commit 5c3ae9e

Browse files
authoredNov 4, 2020
Merge pull request #2 from ddrv-fork/master
Add github actions CI
2 parents 47997ea + 806339f commit 5c3ae9e

File tree

5 files changed

+38
-5
lines changed

5 files changed

+38
-5
lines changed
 

‎.github/workflows/ci.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
tests:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
php: [7.0, 7.1, 7.2, 7.3, 7.4, 8.0]
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v2
16+
17+
- name: Setup PHP
18+
uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: ${{ matrix.php }}
21+
coverage: none
22+
23+
- name: Validate composer.json and composer.lock
24+
run: composer validate
25+
26+
- name: Install dependencies
27+
run: composer install --prefer-dist --no-progress --no-interaction --no-suggest
28+
29+
- name: Check code style
30+
run: vendor/bin/phpcs
31+
32+
- name: Run test suite
33+
run: vendor/bin/phpunit

‎composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"psr/http-client": "^1.0"
1919
},
2020
"require-dev": {
21-
"nyholm/psr7": "^1.3",
22-
"phpunit/phpunit": "^6.5",
21+
"guzzlehttp/psr7": "^1.7",
22+
"phpunit/phpunit": ">=6.5",
2323
"squizlabs/php_codesniffer": "^3.5",
2424
"webclient/fake-http-client": "^1.0"
2525
},

‎phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="vendor/autoload.php" colors="true">
2+
<phpunit bootstrap="vendor/autoload.php" colors="true" cacheResult="false">
33
<testsuites>
44
<testsuite name="all">
55
<directory>tests</directory>

‎stuff/Handler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Stuff\Webclient\Extension\Cookie;
66

7-
use Nyholm\Psr7\Response;
7+
use GuzzleHttp\Psr7\Response;
88
use Psr\Http\Message\ResponseInterface;
99
use Psr\Http\Message\ServerRequestInterface;
1010
use Psr\Http\Server\RequestHandlerInterface;

‎tests/CookieClientTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Tests\Webclient\Extension\Cookie;
66

7-
use Nyholm\Psr7\Request;
7+
use GuzzleHttp\Psr7\Request;
88
use PHPUnit\Framework\TestCase;
99
use Psr\Http\Client\ClientExceptionInterface;
1010
use Stuff\Webclient\Extension\Cookie\Handler;

0 commit comments

Comments
 (0)
Please sign in to comment.