Skip to content

Don't run integration tests in CI #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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