Skip to content

Commit 4ea2528

Browse files
committed
Run tests on PHP 8.4 and update test environment
1 parent d9f16d2 commit 4ea2528

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ on:
77
jobs:
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
@@ -29,14 +30,32 @@ 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+
ini-values: memory_limit=512M
3436
- run: composer install
35-
- run: docker pull busybox:latest
36-
- run: vendor/bin/phpunit --coverage-text --coverage-clover=clover.xml
37+
- name: Setup Docker environment
38+
run: |
39+
docker pull busybox:latest
40+
docker info
41+
docker network prune -f
42+
docker network ls
43+
# Make sure networks are properly initialized
44+
for i in {1..3}; do
45+
docker network create test_network_$i
46+
docker run --rm --network test_network_$i busybox echo "Network $i working"
47+
done
48+
docker network ls
49+
# Clean up
50+
for i in {1..3}; do
51+
docker network rm test_network_$i
52+
done
53+
- name: Run tests (PHP >= 7.3)
3754
if: ${{ matrix.php >= 7.3 }}
38-
- run: vendor/bin/phpunit --coverage-text --coverage-clover=clover.xml -c phpunit.xml.legacy
55+
run: vendor/bin/phpunit --coverage-text --coverage-clover=clover.xml
56+
- name: Run tests (PHP < 7.3)
3957
if: ${{ matrix.php < 7.3 }}
58+
run: vendor/bin/phpunit --coverage-text --coverage-clover=clover.xml -c phpunit.xml.legacy
4059
- name: Check 100% code coverage
4160
shell: php {0}
4261
run: |

0 commit comments

Comments
 (0)