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
1415 - 8.3
1516 - 8.2
1617 - 8.1
17- - 8.0
18- - 7.4
19- - 7.3
20- - 7.2
21- - 7.1
22- - 7.0
23- - 5.6
24- - 5.5
25- - 5.4
26- - 5.3
2718 steps :
2819 - uses : actions/checkout@v4
2920 - uses : shivammathur/setup-php@v2
3021 with :
3122 php-version : ${{ matrix.php }}
32- coverage : xdebug
23+ coverage : ${{ matrix.php < 8.0 && ' xdebug' || 'pcov' }}
3324 ini-file : development
3425 - run : composer install
3526 - run : docker pull busybox:latest
27+ - run : docker info
28+
29+ # Debug: Initial state
30+ - name : Debug - Show initial Docker networks
31+ run : |
32+ echo "=== Initial Docker Networks ==="
33+ docker network ls
34+ echo "=== Network count ==="
35+ docker network ls --format "table {{.ID}}\t{{.Name}}\t{{.Driver}}" | wc -l
36+ echo "=== Network names only ==="
37+ docker network ls --format "{{.Name}}"
38+
39+ # Clean up any existing test networks
40+ - name : Clean up existing test networks
41+ run : |
42+ docker network rm test_network 2>/dev/null || true
43+ docker network prune -f
44+
45+ # Test basic network operations
46+ - run : docker network create test_network
47+ - name : Debug - After creating test_network
48+ run : |
49+ echo "=== After creating test_network ==="
50+ docker network ls
51+ echo "=== Network count ==="
52+ docker network ls --format "table {{.ID}}\t{{.Name}}\t{{.Driver}}" | wc -l
53+
54+ - run : docker network rm test_network
55+ - name : Debug - After removing test_network
56+ run : |
57+ echo "=== After removing test_network ==="
58+ docker network ls
59+ echo "=== Network count ==="
60+ docker network ls --format "table {{.ID}}\t{{.Name}}\t{{.Driver}}" | wc -l
61+
62+ # Final cleanup before tests
63+ - run : docker network prune -f
64+ - name : Debug - Final state before tests
65+ run : |
66+ echo "=== Final state before tests ==="
67+ docker network ls
68+ echo "=== Network count ==="
69+ docker network ls --format "table {{.ID}}\t{{.Name}}\t{{.Driver}}" | wc -l
70+
71+ # Run only the failing test first to get more info
72+ - name : Run failing test with verbose output
73+ run : vendor/bin/phpunit --filter testCreateConnectDisconnectAndRemoveNetwork -v --debug
74+ if : ${{ matrix.php >= 7.3 }}
75+
76+ # Run full test suite
3677 - run : vendor/bin/phpunit --coverage-text --coverage-clover=clover.xml
3778 if : ${{ matrix.php >= 7.3 }}
3879 - run : vendor/bin/phpunit --coverage-text --coverage-clover=clover.xml -c phpunit.xml.legacy
3980 if : ${{ matrix.php < 7.3 }}
81+
4082 - name : Check 100% code coverage
4183 shell : php {0}
4284 run : |
4385 <?php
4486 $metrics = simplexml_load_file('clover.xml')->project->metrics;
45- exit((int) $metrics['statements'] === (int) $metrics['coveredstatements'] ? 0 : 1);
87+ exit((int) $metrics['statements'] === (int) $metrics['coveredstatements'] ? 0 : 1);
0 commit comments