77jobs :
88 PHPUnit :
99 name : PHPUnit (PHP ${{ matrix.php }})
10- runs-on : ubuntu-22 .04
10+ runs-on : ubuntu-24 .04
1111 strategy :
1212 matrix :
1313 php :
14+ # - 8.4 # Temporarily disabled due to rize/uri-template compatibility issues
1415 - 8.3
1516 - 8.2
1617 - 8.1
@@ -29,17 +30,74 @@ jobs:
2930 - uses : shivammathur/setup-php@v2
3031 with :
3132 php-version : ${{ matrix.php }}
32- coverage : xdebug
33+ coverage : ${{ matrix.php < 8.0 && ' xdebug' || 'pcov' }}
3334 ini-file : development
35+ # Ignore deprecation warnings for PHP 8.4 compatibility
36+ ini-values : error_reporting=E_ALL & ~E_DEPRECATED
3437 - run : composer install
3538 - run : docker pull busybox:latest
39+ - run : docker info
40+
41+ # Debug: Initial state
42+ - name : Debug - Show initial Docker networks
43+ run : |
44+ echo "=== Initial Docker Networks ==="
45+ docker network ls
46+ echo "=== Network count ==="
47+ docker network ls --format "table {{.ID}}\t{{.Name}}\t{{.Driver}}" | wc -l
48+ echo "=== Network names only ==="
49+ docker network ls --format "{{.Name}}"
50+
51+ # Clean up any existing test networks
52+ - name : Clean up existing test networks
53+ run : |
54+ docker network rm test_network 2>/dev/null || true
55+ docker network prune -f
56+
57+ # Test basic network operations
58+ - run : docker network create test_network
59+ - name : Debug - After creating test_network
60+ run : |
61+ echo "=== After creating test_network ==="
62+ docker network ls
63+ echo "=== Network count ==="
64+ docker network ls --format "table {{.ID}}\t{{.Name}}\t{{.Driver}}" | wc -l
65+
66+ - run : docker network rm test_network
67+ - name : Debug - After removing test_network
68+ run : |
69+ echo "=== After removing test_network ==="
70+ docker network ls
71+ echo "=== Network count ==="
72+ docker network ls --format "table {{.ID}}\t{{.Name}}\t{{.Driver}}" | wc -l
73+
74+ # Final cleanup before tests
75+ - run : docker network prune -f
76+ - name : Debug - Final state before tests
77+ run : |
78+ echo "=== Final state before tests ==="
79+ docker network ls
80+ echo "=== Network count ==="
81+ docker network ls --format "table {{.ID}}\t{{.Name}}\t{{.Driver}}" | wc -l
82+
83+ # Run only the failing test first to get more info
84+ - name : Run failing test with verbose output
85+ run : |
86+ echo "=== Running the failing test ==="
87+ vendor/bin/phpunit --filter testCreateConnectDisconnectAndRemoveNetwork -v --debug || true
88+ echo "=== Networks after failed test ==="
89+ docker network ls
90+ if : ${{ matrix.php >= 7.3 }}
91+
92+ # Run full test suite
3693 - run : vendor/bin/phpunit --coverage-text --coverage-clover=clover.xml
3794 if : ${{ matrix.php >= 7.3 }}
3895 - run : vendor/bin/phpunit --coverage-text --coverage-clover=clover.xml -c phpunit.xml.legacy
3996 if : ${{ matrix.php < 7.3 }}
97+
4098 - name : Check 100% code coverage
4199 shell : php {0}
42100 run : |
43101 <?php
44102 $metrics = simplexml_load_file('clover.xml')->project->metrics;
45- exit((int) $metrics['statements'] === (int) $metrics['coveredstatements'] ? 0 : 1);
103+ exit((int) $metrics['statements'] === (int) $metrics['coveredstatements'] ? 0 : 1);
0 commit comments