Skip to content

Commit fce790b

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

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 13 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
@@ -31,15 +32,22 @@ jobs:
3132
php-version: ${{ matrix.php }}
3233
coverage: xdebug
3334
ini-file: development
34-
- run: composer install
35-
- run: docker pull busybox:latest
36-
- run: vendor/bin/phpunit --coverage-text --coverage-clover=clover.xml
37-
if: ${{ matrix.php >= 7.3 }}
38-
- run: vendor/bin/phpunit --coverage-text --coverage-clover=clover.xml -c phpunit.xml.legacy
39-
if: ${{ matrix.php < 7.3 }}
40-
- name: Check 100% code coverage
41-
shell: php {0}
42-
run: |
43-
<?php
44-
$metrics = simplexml_load_file('clover.xml')->project->metrics;
45-
exit((int) $metrics['statements'] === (int) $metrics['coveredstatements'] ? 0 : 1);
35+
- run: composer install
36+
- name: Prepare Docker environment
37+
run: |
38+
docker pull busybox:latest
39+
docker info
40+
docker network ls
41+
# Create and remove a test network to ensure networking is ready
42+
docker network create test_network
43+
docker network rm test_network
44+
- run: vendor/bin/phpunit --coverage-text --coverage-clover=clover.xml
45+
if: ${{ matrix.php >= 7.3 }}
46+
- run: vendor/bin/phpunit --coverage-text --coverage-clover=clover.xml -c phpunit.xml.legacy
47+
if: ${{ matrix.php < 7.3 }}
48+
- name: Check 100% code coverage
49+
shell: php {0}
50+
run: |
51+
<?php
52+
$metrics = simplexml_load_file('clover.xml')->project->metrics;
53+
exit((int) $metrics['statements'] === (int) $metrics['coveredstatements'] ? 0 : 1);

0 commit comments

Comments
 (0)