1919env :
2020 ALL_DRIVERS : " gd gmagick imagick"
2121 IMAGINE_TEST_WEBSERVERURL : http://localhost:8013
22- # Uncomment the following line to save test files as artifacts
23- # IMAGINE_TEST_KEEP_TEMPFILES: yes
24-
22+
2523jobs :
26- ubuntu :
24+ test :
2725 name : PHP ${{ matrix.php-version }} - ${{ matrix.extensions }} (Ubuntu)
2826 runs-on : ubuntu-latest
2927 strategy :
3028 fail-fast : false
3129 matrix :
3230 php-version :
33- - " 5 .3"
34- - " 5 .4"
31+ - " 8 .3"
32+ - " 8 .4"
3533 extensions :
3634 - gd,imagick
35+ - gd,gmagick
3736 steps :
3837 - name : Setup PHP
3938 uses : shivammathur/setup-php@v2
4241 extensions : exif,${{ matrix.extensions }}
4342 tools : composer:v2
4443 coverage : none
44+
4545 - name : Inspect environment
4646 id : inspect
4747 run : |
@@ -53,128 +53,27 @@ jobs:
5353 fi
5454 echo ''
5555 done
56- echo "::set-output name=excluded-groups::$EXCLUDED_GROUPS"
57- - name : Checkout
58- uses : actions/checkout@v2
59- - name : Install composer dependencies
60- run : composer update --ansi --no-interaction
61- - name : Start test web server
62- uses : Eun/http-server-action@v1
63- with :
64- directory : ${{ github.workspace }}/tests
65- port : 8013
66- - name : PHPUnit
67- run : composer run test --ansi --no-interaction -- --exclude-group "${{ steps.inspect.outputs.excluded-groups }}" --stop-on-error --stop-on-failure
68- - name : Save tests temporary files
69- if : always() && env.IMAGINE_TEST_KEEP_TEMPFILES == 'yes'
70- uses : actions/upload-artifact@v2
71- with :
72- name : ubuntu-${{ matrix.php-version }}-${{ matrix.extensions }}
73- path : tests/tmp/
74- retention-days : 1
75-
76- windows :
77- name : PHP ${{ matrix.php-version }} - ${{ matrix.extensions }} (Windows)
78- runs-on : windows-latest
79- strategy :
80- fail-fast : false
81- matrix :
82- php-version :
83- - " 5.6"
84- - " 7.4"
85- extensions :
86- - gd,imagick
87- steps :
88- - name : Setup PHP
89- uses : shivammathur/setup-php@v2
90- with :
91- php-version : ${{ matrix.php-version }}
92- extensions : exif,${{ matrix.extensions }}
93- tools : composer:v2
94- coverage : none
95- - name : Inspect environment
96- id : inspect
97- run : |
98- $EXCLUDED_GROUPS='always-skipped'
99- foreach ($DRIVER in $Env:ALL_DRIVERS.split()) {
100- Write-Output "### CHECKING $DRIVER"
101- php --ri $DRIVER
102- if ($LASTEXITCODE -ne 0) {
103- $EXCLUDED_GROUPS="$EXCLUDED_GROUPS,$DRIVER"
104- $Global:LASTEXITCODE = 0
105- }
106- Write-Output ''
107- }
108- Write-Output "::set-output name=excluded-groups::$EXCLUDED_GROUPS"
56+ echo "excluded-groups=$EXCLUDED_GROUPS" >> $GITHUB_OUTPUT
10957
11058 - name : Checkout
111- uses : actions/checkout@v2
59+ uses : actions/checkout@v4
60+
11261 - name : Install composer dependencies
11362 run : composer update --ansi --no-interaction
63+
11464 - name : Start test web server
11565 uses : Eun/http-server-action@v1
11666 with :
11767 directory : ${{ github.workspace }}/tests
11868 port : 8013
119- - name : PHPUnit
120- run : composer run test --ansi --no-interaction -- --exclude-group "${{ steps.inspect.outputs.excluded-groups }}"
121- - name : Save tests temporary files
122- if : always() && env.IMAGINE_TEST_KEEP_TEMPFILES == 'yes'
123- uses : actions/upload-artifact@v2
124- with :
125- name : windows-${{ matrix.php-version }}-${{ matrix.extensions }}
126- path : tests/tmp/
127- retention-days : 1
12869
129- docker :
130- name : PHP ${{ matrix.php-version }} - ${{ matrix.image-suffix }} (Docker)
131- runs-on : ubuntu-latest
132- strategy :
133- fail-fast : false
134- matrix :
135- php-version :
136- - " 5.5"
137- - " 5.6"
138- - " 7.0"
139- - " 7.1"
140- - " 7.2"
141- - " 7.3"
142- - " 7.4"
143- - " 8.0"
144- - " 8.1"
145- image-suffix :
146- - gd-gmagick
147- - gd-imagick
148- container : ghcr.io/php-imagine/test:${{ matrix.php-version }}-${{ matrix.image-suffix }}
149- steps :
150- - name : Inspect environment
151- id : inspect
152- run : |
153- EXCLUDED_GROUPS=always-skipped
154- for DRIVER in $ALL_DRIVERS; do
155- echo "### CHECKING $DRIVER"
156- if ! php --ri $DRIVER; then
157- EXCLUDED_GROUPS="$EXCLUDED_GROUPS,$DRIVER"
158- fi
159- echo ''
160- done
161- echo "::set-output name=excluded-groups::$EXCLUDED_GROUPS"
162- - name : Checkout
163- uses : actions/checkout@v2
164- - name : Install composer dependencies
165- run : composer update --ansi --no-interaction
166- - name : Start test web server
167- id : start-webserver
168- run : |
169- cd ./tests
170- php -n -S 0.0.0.0:8013 &
171- cd - >/dev/null
17270 - name : PHPUnit
173- run : composer run test --ansi --no-interaction -- --exclude-group "${{ steps.inspect.outputs.excluded-groups }}"
71+ run : composer run test --ansi --no-interaction -- --exclude-group "${{ steps.inspect.outputs.excluded-groups }}" --stop-on-error --stop-on-failure
72+
17473 - name : Save tests temporary files
17574 if : always() && env.IMAGINE_TEST_KEEP_TEMPFILES == 'yes'
176- uses : actions/upload-artifact@v2
75+ uses : actions/upload-artifact@v4
17776 with :
178- name : docker -${{ matrix.php-version }}-${{ matrix.image-suffix }}
77+ name : ubuntu -${{ matrix.php-version }}-${{ matrix.extensions }}
17978 path : tests/tmp/
18079 retention-days : 1
0 commit comments