8000 Merge pull request #2 from clue-labs/resurrect-ci · reactphp/async@d4cf21f · GitHub
[go: up one dir, main page]

Skip to content

Commit d4cf21f

Browse files
authored
Merge pull request #2 from clue-labs/resurrect-ci
Add PHPUnit and use GitHub actions for continuous integration (CI)
2 parents 1bb585a + b971bee commit d4cf21f

File tree

7 files changed

+45
-81
lines changed

7 files changed

+45
-81
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
- 7.4
15+
- 7.3
16+
- 7.2
17+
- 7.1
18+
- 5.6
19+
- 5.5
20+
- 5.4
21+
- 5.3
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: shivammathur/setup-php@v2
25+
with:
26+
php-version: ${{ matrix.php }}
27+
coverage: xdebug
28+
- run: composer install
29+
- run: vendor/bin/phpunit --coverage-text

.gitignore

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

.travis.yml

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

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Async utilities for React.
66

77
It is heavily influenced by [async.js](https://github.com/caolan/async).
88

9-
[![Build Status](https://secure.travis-ci.org/reactphp/async.png?branch=master)](http://travis-ci.org/reactphp/async)
9+
[![CI status](https://github.com/reactphp/async/workflows/CI/badge.svg)](https://github.com/reactphp/async/actions)
1010

1111
## About
1212

@@ -118,9 +118,18 @@ $loop->run();
118118

119119
## Tests
120120

121-
To run the test suite, you need PHPUnit.
121+
To run the test suite, you first need to clone this repo and then install all
122+
dependencies [through Composer](https://getcomposer.org/):
122123

123-
$ phpunit
124+
```bash
125+
$ composer install
126+
```
127+
128+
To run the test suite, go to the project root and run:
129+
130+
```bash
131+
$ php vendor/bin/phpunit
132+
```
124133

125134
## License
126135

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"php": ">=5.3.2"
88
},
99
"require-dev": {
10+
"phpunit/phpunit": "^5.7 || ^4.8.35",
1011
"react/event-loop": "0.2.*"
1112
},
1213
"suggest": {

composer.lock

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

tests/React/Tests/Async/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class TestCase extends \PHPUnit_Framework_TestCase
66
{
77
protected function createCallableMock($expects, $with = null)
88
{
9-
$callable = $this->getMock('React\Tests\Async\CallableStub');
9+
$callable = $this->getMockBuilder('React\Tests\Async\CallableStub')->getMock();
1010

1111
$method = $callable
1212
->expects($expects)

0 commit comments

Comments
 (0)
0