Skip to content

Commit c29057b

Browse files
committed
Add docker-compose.yml to make it possible to test any php versions
Signed-off-by: Hidehito Nozawa <[email protected]>
1 parent 3133ff4 commit c29057b

File tree

4 files changed

+34
-28
lines changed

4 files changed

+34
-28
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,13 @@ If you want to know APIs, please see [`FeedInterface`](src/Suin/RSSWriter/FeedIn
129129
## How to Test
130130

131131
```sh
132-
$ ./phpunit
132+
$ vendor/bin/phpunit
133+
```
134+
135+
## Test through PHP 5.4 ~ PHP 7.0
136+
137+
```console
138+
$ docker-compose up
133139
```
134140

135141
## License

docker-compose.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: "2"
2+
services:
3+
php70:
4+
image: php:7.0-alpine
5+
command: vendor/bin/phpunit
6+
volumes: [".:/app"]
7+
working_dir: /app
8+
9+
php56:
10+
image: php:5.6-alpine
11+
command: vendor/bin/phpunit
12+
volumes: [".:/app"]
13+
working_dir: /app
14+
15+
php55:
16+
image: php:5.5-alpine
17+
command: vendor/bin/phpunit
18+
volumes: [".:/app"]
19+
working_dir: /app
20+
21+
php54:
22+
image: php:5.4-cli
23+
command: vendor/bin/phpunit
24+
volumes: [".:/app"]
25+
working_dir: /app

tests/Bootstrap.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@
88
@include_once strtr($c, '\\_', '//') . '.php';
99
});
1010
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__DIR__) . '/src');
11+
12+
date_default_timezone_set('UTC');

tests/README.md

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

0 commit comments

Comments
 (0)