Skip to content

Commit f14fbd5

Browse files
authored
Improved travis config (#692)
* Improved travis config * Trying to sort out dependencies and make it to work with travis * Do not allow deps=low to fail * Fixes * Install php-geoip only on the providers that needs it. * Bugfix * Im shooting in the dark here... * Try to not run tests i paralell. * Always prefer dist * Syntax fix and prefer composer dist * Run parent::setUpBeforeClass * Fixed deps low * Applied changes from StyleCI * Syntax fix
1 parent 6eabf18 commit f14fbd5

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

.travis.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
language: php
22
sudo: false
3-
dist: trusty
4-
php: 7.0
53

6-
addons:
7-
apt_packages:
8-
- libgeoip-dev
9-
- php-geoip
4+
php: 7.0
105

116
install:
127
- composer update --prefer-stable --prefer-dist

Tests/IntegrationTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@ class IntegrationTest extends ProviderIntegrationTest
2929
protected $testIpv6 = false;
3030
protected $testHttpProvider = false;
3131

32+
public static function setUpBeforeClass()
33+
{
34+
if (false == function_exists('geoip_open')) {
35+
self::markTestSkipped('The maxmind\'s official lib required to run these tests.');
36+
}
37+
38+
if (false == function_exists('GeoIP_record_by_addr')) {
39+
self::markTestSkipped('The maxmind\'s official lib required to run these tests.');
40+
}
41+
42+
parent::setUpBeforeClass();
43+
}
44+
3245
protected function createProvider(HttpClient $httpClient)
3346
{
3447
return new MaxMindBinary(__DIR__.'/fixtures/GeoLiteCity.dat');

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
],
1414
"require": {
1515
"php": "^7.0",
16-
"ext-geoip": "*",
1716
"geoip/geoip": "^1.17",
1817
"willdurand/geocoder": "^4.0"
1918
},

0 commit comments

Comments
 (0)