Skip to content

Commit

Permalink
Merge pull request #2 from ddrv-fork/master
Browse files Browse the repository at this point in the history
Add github actions CI
  • Loading branch information
ddrv authored Nov 4, 2020
2 parents 47997ea + 806339f commit 5c3ae9e
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 5 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI

on: [push, pull_request]

jobs:
tests:
runs-on: ubuntu-latest

strategy:
matrix:
php: [7.0, 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 }}
coverage: none

- name: Validate composer.json and composer.lock
run: composer validate

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-interaction --no-suggest

- name: Check code style
run: vendor/bin/phpcs

- name: Run test suite
run: vendor/bin/phpunit
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"psr/http-client": "^1.0"
},
"require-dev": {
"nyholm/psr7": "^1.3",
"phpunit/phpunit": "^6.5",
"guzzlehttp/psr7": "^1.7",
"phpunit/phpunit": ">=6.5",
"squizlabs/php_codesniffer": "^3.5",
"webclient/fake-http-client": "^1.0"
},
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php" colors="true">
<phpunit bootstrap="vendor/autoload.php" colors="true" cacheResult="false">
<testsuites>
<testsuite name="all">
<directory>tests</directory>
Expand Down
2 changes: 1 addition & 1 deletion stuff/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Stuff\Webclient\Extension\Cookie;

use Nyholm\Psr7\Response;
use GuzzleHttp\Psr7\Response;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
Expand Down
2 changes: 1 addition & 1 deletion tests/CookieClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Tests\Webclient\Extension\Cookie;

use Nyholm\Psr7\Request;
use GuzzleHttp\Psr7\Request;
use PHPUnit\Framework\TestCase;
use Psr\Http\Client\ClientExceptionInterface;
use Stuff\Webclient\Extension\Cookie\Handler;
Expand Down

0 comments on commit 5c3ae9e

Please sign in to comment.