8000 Merge pull request #111 from SimonFrings/ci · SimonFrings/reactphp-redis@dc39f79 · GitHub
[go: up one dir, main page]

Skip to content

Commit dc39f79

Browse files
authored
Merge pull request clue#111 from SimonFrings/ci
Use GitHub actions for continuous integration (CI)
2 parents a3630f1 + 69a7615 commit dc39f79

File tree

5 files changed

+62
-38
lines changed

5 files changed

+62
-38
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/.gitattributes export-ignore
2+
/.github/workflows/ export-ignore
23
/.gitignore export-ignore
3-
/.travis.yml export-ignore
44
/examples/ export-ignore
55
/phpunit.xml.dist export-ignore
66
/phpunit.xml.legacy export-ignore

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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-20.04
11+
strategy:
12+
matrix:
13+
php:
14+
- 8.0
15+
- 7.4
16+
- 7.3
17+
- 7.2
18+
- 7.1
19+
- 7.0
20+
- 5.6
21+
- 5.5
22+
- 5.4
23+
- 5.3
24+
steps:
25+
- uses: actions/checkout@v2
26+
- uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php }}
29+
coverage: xdebug
30+
- run: composer install
31+
- run: docker run --net=host -d redis
32+
- run: REDIS_URI=localhost:6379 vendor/bin/phpunit --coverage-text
33+
if: ${{ matrix.php >= 7.3 }}
34+
- run: REDIS_URI=localhost:6379 vendor/bin/phpunit --coverage-text -c phpunit.xml.legacy
35+
if: ${{ matrix.php < 7.3 }}
36+
37+
PHPUnit-hhvm:
38+
name: PHPUnit (HHVM)
39+
runs-on: ubuntu-18.04
40+
continue-on-error: true
41+
steps:
42+
- uses: actions/checkout@v2
43+
- uses: azjezz/setup-hhvm@v1
44+
with:
45+
version: lts-3.30
46+
- run: hhvm $(which composer) install
47+
- run: docker run --net=host -d redis
48+
- run: REDIS_URI=localhost:6379 hhvm vendor/bin/phpunit

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
/vendor
21
/composer.lock
2+
/vendor/

.travis.yml

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

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# clue/reactphp-redis [![Build Status](https://travis-ci.org/clue/reactphp-redis.svg?branch=master)](https://travis-ci.org/clue/reactphp-redis)
1+
# clue/reactphp-redis
2+
3+
[![CI status](https://github.com/clue/reactphp-redis/workflows/CI/badge.svg)](https://github.com/clue/reactphp-redis/actions)
24

35
Async [Redis](https://redis.io/) client implementation, built on top of [ReactPHP](https://reactphp.org/).
46

@@ -555,7 +557,7 @@ $ composer require clue/redis-react:^2.4
555557
See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
556558

557559
This project aims to run on any platform and thus does not require any PHP
558-
extensions and supports running on legacy PHP 5.3 through current PHP 7+ and
560+
extensions and supports running on legacy PHP 5.3 through current PHP 8+ and
559561
HHVM.
560562
It's *highly recommended to use PHP 7+* for this project.
561563

@@ -577,7 +579,14 @@ $ php vendor/bin/phpunit
577579
The test suite contains both unit tests and functional integration tests.
578580
The functional tests require access to a running Redis server instance
579581
and will be skipped by default.
580-
If you want to also run the functional tests, you need to supply *your* login
582+
583+
If you don't have access to a running Redis server, you can also use a temporary `Redis` Docker image:
584+
585+
```bash
586+
$ docker run --net=host redis
587+
```
588+
589+
To now run the functional tests, you need to supply *your* login
581590
details in an environment variable like this:
582591

583592
```bash

0 commit comments

Comments
 (0)
0