Skip to content

Commit 459302d

Browse files
authored
Merge pull request #11 from polidog/ci
CIをGithubActionsへ移行
2 parents bea62db + fdcdbe1 commit 459302d

File tree

9 files changed

+32
-34
lines changed

9 files changed

+32
-34
lines changed

.coveralls.yml

-4
This file was deleted.

.github/workflows/test.yaml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: test
2+
3+
on: ['push']
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
max-parallel: 5
10+
matrix:
11+
php-versions: [ '7.0', '7.1', '7.2', '7.3', '7.4' ]
12+
13+
steps:
14+
- uses: actions/checkout@v1
15+
- name: Run composer install
16+
run: |
17+
composer install
18+
- name: phpunit
19+
run: |
20+
composer test

.travis.yml

-20
This file was deleted.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
php-chatwork-api
22
================
33

4-
[![Build Status](https://travis-ci.org/polidog/php-chatwork-api.png?branch=develop)](https://travis-ci.org/polidog/php-chatwork-api)
4+
![test](https://github.com/polidog/php-chatwork-api/workflows/test/badge.svg)
55
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/polidog/php-chatwork-api/badges/quality-score.png?s=56ea782f70ecfbe3de485e4be2a2c585455e44e3)](https://scrutinizer-ci.com/g/polidog/php-chatwork-api/)
66
[![Latest Stable Version](https://poser.pugx.org/polidog/php-chatwork-api/v/stable.svg)](https://packagist.org/packages/polidog/php-chatwork-api)
77
[![Total Downloads](https://poser.pugx.org/polidog/php-chatwork-api/downloads.svg)](https://packagist.org/packages/polidog/php-chatwork-api)

composer.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@
1515
"php": ">=7.0",
1616
"guzzlehttp/guzzle": "^6.0",
1717
"cakephp/utility": "^3.0",
18-
"friendsofphp/php-cs-fixer": "^2.10"
18+
"friendsofphp/php-cs-fixer": "^2.16"
1919
},
2020
"require-dev": {
21-
"satooshi/php-coveralls": "v2.0.0.",
2221
"phpunit/phpunit": "^6.5"
2322
},
2423
"autoload": {

tests/Api/Rooms/FilesTest.php

+6-3
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,16 @@ public function testShow($apiResult)
3232

3333
/**
3434
* @dataProvider providerFile
35+
* @param array $apiResult
3536
*/
3637
public function testDetail($apiResult)
3738
{
3839
$fileId = 1;
3940
$roomId = 1;
4041
$client = $this->prophesize(ClientInterface::class);
41-
$client->get("rooms/{$roomId}/files/{$fileId}")
42+
$client->get("rooms/{$roomId}/files/{$fileId}", [
43+
'create_download_url' => 0
44+
])
4245
->willReturn($apiResult);
4346

4447
$factory = new FileFactory();
@@ -55,7 +58,7 @@ public function providerFiles()
5558
"account": {
5659
"account_id": 123,
5760
"name": "Bob",
58-
"avatar_image_url": "https://example.com/ico_avatar.png"
61+
"avatar_image_url": "https://dummyimage.com/600x400/000/fff.png"
5962
},
6063
"message_id": "22",
6164
"filename": "README.md",
@@ -75,7 +78,7 @@ public function providerFile()
7578
"account": {
7679
"account_id":123,
7780
"name":"Bob",
78-
"avatar_image_url": "https://example.com/ico_avatar.png"
81+
"avatar_image_url": "https://dummyimage.com/600x400/000/fff.png"
7982
},
8083
"message_id": "22",
8184
"filename": "README.md",

tests/Api/Rooms/MessagesTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function providerMessages()
8282
"account": {
8383
"account_id": 123,
8484
"name": "Bob",
85-
"avatar_image_url": "https://example.com/ico_avatar.png"
85+
"avatar_image_url": "https://dummyimage.com/600x400/000/fff.png"
8686
},
8787
"body": "Hello Chatwork!",
8888
"send_time": 1384242850,
@@ -102,7 +102,7 @@ public function providerMessage()
102102
"account": {
103103
"account_id": 123,
104104
"name": "Bob",
105-
"avatar_image_url": "https://example.com/ico_avatar.png"
105+
"avatar_image_url": "https://dummyimage.com/600x400/000/fff.png"
106106
},
107107
"body": "Hello Chatwork!",
108108
"send_time": 1384242850,

tests/Entity/Factory/FileFactoryTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function testCreateEntity()
1616
"account": {
1717
"account_id":123,
1818
"name":"Bob",
19-
"avatar_image_url": "https://example.com/ico_avatar.png"
19+
"avatar_image_url": "https://dummyimage.com/600x400/000/fff.png"
2020
},
2121
"message_id": "22",
2222
"filename": "README.md",

tests/Entity/Factory/MessageFactoryTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function testCreateMessageEntity()
1616
"account": {
1717
"account_id": 123,
1818
"name": "Bob",
19-
"avatar_image_url": "https://example.com/ico_avatar.png"
19+
"avatar_image_url": "https://dummyimage.com/600x400/000/fff.png"
2020
},
2121
"body": "Hello Chatwork!",
2222
"send_time": 1384242850,

0 commit comments

Comments
 (0)