File tree 4 files changed +6
-16
lines changed
4 files changed +6
-16
lines changed Original file line number Diff line number Diff line change 6
6
test :
7
7
runs-on : ${{ matrix.os }}
8
8
9
- services :
10
- opentsdb :
11
- image : petergrace/opentsdb-docker:latest
12
- ports :
13
- - 4242:4242
14
- - 60030:60030
15
-
16
9
strategy :
17
10
fail-fast : false
18
11
matrix :
36
29
- name : Install dependencies
37
30
run : composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
38
31
39
- - name : Check if OpenTSDB service is running
40
- run : |
41
- docker ps | grep opentsdb
42
-
43
32
- name : Execute tests
44
- run : vendor/bin/phpunit
33
+ run : APP_ENV=ci ./ vendor/bin/phpunit
Original file line number Diff line number Diff line change @@ -58,7 +58,6 @@ services:
58
58
- WAITSECS=30 # Give time for hbase to shut down, otherwise data corruption may result
59
59
ports :
60
60
- 4242:4242
61
- - 60030:60030
62
61
networks :
63
62
- php-opentsdb-client-lib
64
63
volumes :
Original file line number Diff line number Diff line change 14
14
</testsuite >
15
15
</testsuites >
16
16
<php >
17
- <server name =" APP_ENV" value =" testing" />
17
+ <env name =" APP_ENV" value =" testing" />
18
18
</php >
19
19
</phpunit >
Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ final class OpenTsdbClientTest extends TestCase
22
22
{
23
23
public function testSuccess (): void
24
24
{
25
- $ this ->markTestSkipped ('Only for development environment. Need to pull opentsdb container to GitHub. ' );
25
+ if ($ _ENV ['APP_ENV ' ] === 'ci ' ) {
26
+ $ this ->markTestSkipped ('Only for development environment. Need to pull opentsdb container to GitHub. ' );
27
+ }
26
28
27
29
$ dataPointList [] = new DataPoint (
28
30
metric: 'temperature ' ,
@@ -56,7 +58,7 @@ private function initOpenTsdbClient(): OpenTsdbClient
56
58
'http_errors ' => false ,
57
59
],
58
60
),
59
- baseUri: 'http:// opentsdb:4242 ' ,
61
+ baseUri: 'opentsdb:4242 ' ,
60
62
);
61
63
}
62
64
}
You can’t perform that action at this time.
0 commit comments