Skip to content

Commit

Permalink
Add opentsdb to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
antonkomarev committed Sep 2, 2024
1 parent 8cbf9aa commit 71a5486
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest]
php: [8.3, 8.2, 8.1, 8.0]
dependency-version: [prefer-lowest, prefer-stable]

Expand All @@ -29,4 +30,4 @@ jobs:
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction

- name: Execute tests
run: vendor/bin/phpunit
run: APP_ENV=ci ./vendor/bin/phpunit
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,9 @@ services:
container_name: php-opentsdb-client-lib-opentsdb
image: petergrace/opentsdb-docker:latest
environment:
- WAITSECS=30 # Give time for hbase to shutdown, otherwise data corruption may result
- WAITSECS=30 # Give time for hbase to shut down, otherwise data corruption may result
ports:
- 4242:4242
- 60030:60030
networks:
- php-opentsdb-client-lib
volumes:
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
</testsuite>
</testsuites>
<php>
<server name="APP_ENV" value="testing"/>
<env name="APP_ENV" value="testing"/>
</php>
</phpunit>
4 changes: 3 additions & 1 deletion test/Integration/OpenTsdbClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ final class OpenTsdbClientTest extends TestCase
{
public function testSuccess(): void
{
$this->markTestSkipped('Only for development environment. Need to pull opentsdb container to GitHub.');
if ($_ENV['APP_ENV'] === 'ci') {
$this->markTestSkipped('Only for development environment. Need to pull opentsdb container to GitHub.');
}

$dataPointList[] = new DataPoint(
metric: 'temperature',
Expand Down

0 comments on commit 71a5486

Please sign in to comment.