Skip to content

Commit

Permalink
Merge pull request #15 from SimonFrings/github-actions
Browse files Browse the repository at this point in the history
Use GitHub actions for continuous integration (CI)
  • Loading branch information
clue authored Jul 8, 2024
2 parents 271b800 + 4bb6344 commit 786fa95
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 26 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI

on:
push:
pull_request:

jobs:
PHPUnit:
name: PHPUnit (PHP ${{ matrix.php }})
runs-on: ubuntu-22.04
strategy:
matrix:
php:
- 5.4
- 5.3
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
- run: composer install
- run: vendor/bin/phpunit --coverage-text
8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

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

[![CI status](https://github.com/clue/php-redis-protocol/actions/workflows/ci.yml/badge.svg)](https://github.com/clue/php-redis-protocol/actions)
[![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)

A streaming redis protocol parser and serializer written in PHP

This parser and serializer implementation allows you to parse redis protocol
Expand Down
12 changes: 11 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,17 @@
"require": {
"php": ">=5.3"
},
"require-dev": {
"phpunit/phpunit": "^4.8.36"
},
"autoload": {
"psr-0": { "Clue\\Redis\\Protocol": "src" }
"psr-0": {
"Clue\\Redis\\Protocol": "src/"
}
} ,
"autoload-dev": {
"psr-0": {
"": "tests/"
}
}
}
16 changes: 9 additions & 7 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit bootstrap="tests/bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
>
<!-- PHPUnit configuration file with old format for legacy PHPUnit -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/4.8/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true">
<testsuites>
<testsuite name="Redis Protocol Test Suite">
<directory>./tests/</directory>
Expand All @@ -16,4 +15,7 @@
<directory>./src/</directory>
</whitelist>
</filter>
</phpunit>
<php>
<ini name="error_reporting" value="-1" />
</php>
</phpunit>
2 changes: 1 addition & 1 deletion tests/Parser/ResponseParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use Clue\Redis\Protocol\Parser\ResponseParser;

class RecursiveParserTest extends AbstractParserTest
class ResponseParserTest extends AbstractParserTest
{
protected function createParser()
{
Expand Down
2 changes: 0 additions & 2 deletions tests/Serializer/AbstractSerializerTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?php

use Clue\Redis\Protocol\Serializer\SerializerInterface;
use Clue\Redis\Protocol\Model\Status;
use Clue\Redis\Protocol\Model\ErrorReplyException;
//use Exception;

abstract class AbstractSerializerTest extends TestCase
Expand Down
5 changes: 5 additions & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

class TestCase extends PHPUnit_Framework_TestCase
{
}
7 changes: 0 additions & 7 deletions tests/bootstrap.php

This file was deleted.

0 comments on commit 786fa95

Please sign in to comment.