Skip to content

Commit a023b47

Browse files
authored
Adds TravisCI and Codacy
1 parent 1badfd9 commit a023b47

8 files changed

Lines changed: 64 additions & 31 deletions

File tree

.gitattributes

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
*.php diff=php
22

3-
/build export-ignore
4-
/Tests export-ignore
5-
/phpunit.* export-ignore
6-
/composer.* export-ignore
7-
/*.yml export-ignore
3+
/build export-ignore
4+
/Tests export-ignore
5+
/vendor export-ignore
6+
/.gitattributes export-ignore
7+
/.gitignore export-ignore
8+
/phpunit.xml export-ignore
9+
/composer.lock export-ignore
10+
/*.yml export-ignore

.travis.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
language: php
2+
3+
sudo: false
4+
5+
cache:
6+
directories:
7+
- $HOME/.composer/cache
8+
9+
notifications:
10+
email: false
11+
12+
php:
13+
- 7.1
14+
- 7.2
15+
- 7.3
16+
17+
matrix:
18+
fast_finish: true
19+
20+
services:
21+
- redis-server
22+
- memcached
23+
24+
env:
25+
- REDIS_SERVER_HOST=127.0.0.1 REDIS_SERVER_PORT=6379 MEMCACHED_POOL=[["127.0.0.1",11211]]
26+
27+
before_script:
28+
- echo "extension=memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
29+
- echo "extension=redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
30+
- pecl install igbinary
31+
- pecl install msgpack
32+
33+
install:
34+
- composer update -o --no-interaction --ignore-platform-reqs
35+
36+
script:
37+
- vendor/bin/phpunit --coverage-clover build/coverage/clover.xml
38+
39+
after_success:
40+
- travis_retry vendor/bin/codacycoverage clover build/coverage/clover.xml

LICENSE

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
BSD 3-Clause License
22

3-
Koded - Extended Caching Library
4-
Copyright (c) 2018, Mihail Binev
3+
Copyright (c) 2019, Mihail Binev
54
All rights reserved.
65

76
Redistribution and use in source and binary forms, with or without
87
modification, are permitted provided that the following conditions are met:
98

10-
* Redistributions of source code must retain the above copyright notice, this
11-
list of conditions and the following disclaimer.
9+
1. Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
1211

13-
* Redistributions in binary form must reproduce the above copyright notice,
14-
this list of conditions and the following disclaimer in the documentation
15-
and/or other materials provided with the distribution.
12+
2. Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
1615

17-
* Neither the name of the copyright holder nor the names of its
18-
contributors may be used to endorse or promote products derived from
19-
this software without specific prior written permission.
16+
3. Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
2019

2120
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
2221
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Koded - Extended Caching Library
33

44
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.1-8892BF.svg)](https://php.net/)
55
[![Build Status](https://scrutinizer-ci.com/g/kodedphp/cache-extended/badges/build.png?b=master)](https://scrutinizer-ci.com/g/kodedphp/cache-extended/build-status/master)
6-
[![Code Coverage](https://scrutinizer-ci.com/g/kodedphp/cache-extended/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/kodedphp/cache-extended/?branch=master)
7-
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/kodedphp/cache-extended/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/kodedphp/cache-extended/?branch=master)
6+
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/f1aefebb27b1485dbeb2b00ffe7c77fc)](https://www.codacy.com/app/kodeart/cache-extended)
7+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/f1aefebb27b1485dbeb2b00ffe7c77fc)](https://www.codacy.com/app/kodeart/cache-extended)
88
[![Latest Stable Version](https://img.shields.io/packagist/v/koded/cache-extended.svg)](https://packagist.org/packages/koded/cache-extended)
99
[![Software license](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](LICENSE)
1010

Tests/Integration/MemcachedClientTest.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,9 @@ class MemcachedClientTest extends CachePoolIntegrationTest
1313
*/
1414
public function createCachePool()
1515
{
16-
if (getenv('CI')) {
17-
$servers = [['127.0.0.1', 11211]];
18-
} else {
19-
$servers = [["memcached", 11211]];
20-
}
21-
2216
return CachePool::use('redis', [
2317
'host' => getenv('REDIS_SERVER_HOST'),
24-
'servers' => $servers,
18+
'servers' => [["memcached", 11211]],
2519
]);
2620
}
2721

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.1
1+
1.0.2

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
}
2121
],
2222
"require": {
23-
"php": "^7.1.4",
23+
"php": "^7.3",
2424
"psr/cache": "~1",
2525
"koded/cache-simple": "dev-2.0-dev"
2626
},
@@ -43,7 +43,8 @@
4343
"phpunit/phpunit": "~7",
4444
"mikey179/vfsStream": "~1",
4545
"predis/predis": "dev-master",
46-
"cache/integration-tests": "dev-master"
46+
"cache/integration-tests": "dev-master",
47+
"codacy/coverage": "dev-master"
4748
},
4849
"minimum-stability": "dev",
4950
"prefer-stable": true,

phpunit.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,4 @@
2525
<env name="REDIS_SERVER_HOST" value="redis"/>
2626
<env name="REDIS_SERVER_PORT" value="6379"/>
2727
</php>
28-
29-
<logging>
30-
<log type="coverage-clover" target="build/logs/clover.xml"/>
31-
</logging>
3228
</phpunit>

0 commit comments

Comments
 (0)