Skip to content

Commit 94002ce

Browse files
committed
Enhance CI workflow to run full test suite with coverage and streamline Pest test execution; reset Config and StreamWrapper in tests
1 parent 6dc3cd7 commit 94002ce

2 files changed

Lines changed: 17 additions & 2 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,15 @@ jobs:
4646
run: php bin/typephp cache:warm
4747

4848
- name: Run Runtime Type Checking Engine Suite (Pest)
49-
run: ./vendor/bin/pest tests/TypeChecking/ArraysAndShapes/ClassConstKeyShapeTest.php tests/TypeChecking/ArraysAndShapes/OffsetAccessTest.php
49+
run: ./vendor/bin/pest tests/TypeChecking --compact
50+
51+
- name: Run Full Test Suite with Coverage (Pest)
52+
run: ./vendor/bin/pest --coverage-clover=clover.xml --compact
53+
if: matrix.os == 'ubuntu-latest' && matrix.php == '8.4'
54+
55+
- name: Run Full Test Suite (Pest)
56+
run: ./vendor/bin/pest --compact
57+
if: "! (matrix.os == 'ubuntu-latest' && matrix.php == '8.4')"
5058

5159
- name: Upload Coverage to Codecov
5260
uses: codecov/codecov-action@v5

‎tests/Internal/Io/StreamWrapperTest.php‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,11 @@ function testIgnoredFileFunc(int $id): int
407407
});
408408

409409
describe('File Functions Non-Interference (STREAM_OPEN_FOR_INCLUDE)', function () {
410+
afterEach(function () {
411+
Config::reset();
412+
StreamWrapper::reset();
413+
});
414+
410415
test('file_get_contents() returns raw source code without AST transformation', function () {
411416
StreamWrapper::register();
412417

@@ -476,6 +481,7 @@ function sampleAction(int $id): string
476481
if (is_dir($tempDir)) {
477482
@rmdir($tempDir);
478483
}
484+
Config::reset();
479485
}
480486
});
481487

@@ -567,7 +573,8 @@ function dedicatedStreamAction(int $id): int
567573
if (is_dir($tempDir)) {
568574
@rmdir($tempDir);
569575
}
576+
Config::reset();
570577
}
571578
});
572579
});
573-
});
580+
});

0 commit comments

Comments
 (0)