Skip to content

Commit 4bb6344

Browse files
committed
Use GitHub actions for continuous integration (CI)
1 parent 271b800 commit 4bb6344

File tree

9 files changed

+52
-26
lines changed

9 files changed

+52
-26
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
PHPUnit:
9+
name: PHPUnit (PHP ${{ matrix.php }})
10+
runs-on: ubuntu-22.04
11+
strategy:
12+
matrix:
13+
php:
14+
- 5.4
15+
- 5.3
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: ${{ matrix.php }}
21+
coverage: xdebug
22+
- run: composer install
23+
- run: vendor/bin/phpunit --coverage-text

.travis.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# clue/redis-protocol [![Build Status](https://travis-ci.org/clue/php-redis-protocol.png?branch=master)](https://travis-ci.org/clue/php-redis-protocol)
22

3+
[![CI status](https://github.com/clue/php-redis-protocol/actions/workflows/ci.yml/badge.svg)](https://github.com/clue/php-redis-protocol/actions)
4+
[![installs on Packagist](https://img.shields.io/packagist/dt/clue/redis-protocol?color=blue&label=installs%20on%20Packagist)](https://packagist.org/packages/clue/redis-protocol)
5+
36
A streaming redis protocol parser and serializer written in PHP
47

58
This parser and serializer implementation allows you to parse redis protocol

composer.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,17 @@
1313
"require": {
1414
"php": ">=5.3"
1515
},
16+
"require-dev": {
17+
"phpunit/phpunit": "^4.8.36"
18+
},
1619
"autoload": {
17-
"psr-0": { "Clue\\Redis\\Protocol": "src" }
20+
"psr-0": {
21+
"Clue\\Redis\\Protocol": "src/"
22+
}
23+
} ,
24+
"autoload-dev": {
25+
"psr-0": {
26+
"": "tests/"
27+
}
1828
}
1929
}

phpunit.xml.dist

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22

3-
<phpunit bootstrap="tests/bootstrap.php"
4-
colors="true"
5-
convertErrorsToExceptions="true"
6-
convertNoticesToExceptions="true"
7-
convertWarningsToExceptions="true"
8-
>
3+
<!-- PHPUnit configuration file with old format for legacy PHPUnit -->
4+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.8/phpunit.xsd"
6+
bootstrap="vendor/autoload.php"
7+
colors="true">
98
<testsuites>
109
<testsuite name="Redis Protocol Test Suite">
1110
<directory>./tests/</directory>
@@ -16,4 +15,7 @@
1615
<directory>./src/</directory>
1716
</whitelist>
1817
</filter>
19-
</phpunit>
18+
<php>
19+
<ini name="error_reporting" value="-1" />
20+
</php>
21+
</phpunit>

tests/Parser/ResponseParserTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
use Clue\Redis\Protocol\Parser\ResponseParser;
44

5-
class RecursiveParserTest extends AbstractParserTest
5+
class ResponseParserTest extends AbstractParserTest
66
{
77
protected function createParser()
88
{

tests/Serializer/AbstractSerializerTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<?php
22

33
use Clue\Redis\Protocol\Serializer\SerializerInterface;
4-
use Clue\Redis\Protocol\Model\Status;
5-
use Clue\Redis\Protocol\Model\ErrorReplyException;
64
//use Exception;
75

86
abstract class AbstractSerializerTest extends TestCase

tests/TestCase.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?php
2+
3+
class TestCase extends PHPUnit_Framework_TestCase
4+
{
5+
}

tests/bootstrap.php

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)