5353 extensions-suffix : [ '', ', protobuf' ]
5454 dependencies : [ lowest , highest ]
5555 include :
56+ # Add Windows
5657 - os : windows-latest
5758 extensions-suffix : ' , protobuf'
5859 php : 8.1
@@ -63,70 +64,32 @@ jobs:
6364 git config --global core.autocrlf false
6465 git config --global core.eol lf
6566
67+ - name : Check Out Code
68+ uses : actions/checkout@v4
69+
6670 - name : Setup PHP ${{ matrix.php }}
6771 uses : shivammathur/setup-php@v2
6872 with :
6973 php-version : ${{ matrix.php }}
70- tools : composer:v2
7174 extensions : dom, sockets, grpc, curl ${{ matrix.extensions-suffix }}
72- # extensions: dom, sockets, grpc, curl
73-
74- - name : Check Out Code
75- uses : actions/checkout@v4
76- with :
77- fetch-depth : 1
7875
7976 - name : Validate composer.json and composer.lock
8077 run : composer validate --strict
8178
82- - name : Download CPX (PHP 8.4)
83- if : inputs.download-binaries == true && matrix.php == '8.4'
84- run : composer global require cpx/cpx
85-
86- - name : Get Composer Cache Directory
87- id : composer-cache
88- run : echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
89-
90- - name : Cache Composer Dependencies
91- uses : actions/cache@v3
79+ - name : Install dependencies with composer
80+ uses : ramsey/composer-install@v3
9281 with :
93- path : ${{ steps.composer-cache.outputs.dir }}
94- key : php-${{ matrix.php }}-${{ matrix.os }}-composer-${{ hashFiles('**/composer.lock') }}
95- restore-keys : |
96- php-${{ matrix.php }}-${{ matrix.os }}-composer-
97-
98- - name : Install lowest dependencies from composer.json
99- if : matrix.dependencies == 'lowest' && matrix.php != '8.4'
100- run : composer update --no-interaction --no-progress --prefer-lowest
101-
102- - name : Install lowest dependencies from composer.json ignoring ext-php constraint (PHP 8.4)
103- if : matrix.dependencies == 'lowest' && matrix.php == '8.4'
104- run : composer update --no-interaction --no-progress --prefer-lowest --ignore-platform-req php
105-
82+ dependency-versions : ${{ matrix.dependencies }}
10683
10784 - name : Validate lowest dependencies
10885 if : matrix.dependencies == 'lowest' && matrix.php == '8.1'
10986 env :
11087 COMPOSER_POOL_OPTIMIZER : 0
11188 run : vendor/bin/validate-prefer-lowest
11289
113-
114- - name : Install highest dependencies from composer.json
115- if : matrix.dependencies == 'highest' && matrix.php != '8.4'
116- run : composer update --no-interaction --no-progress
117-
118- - name : Install highest dependencies from composer.json ignoring ext-php constraint (PHP 8.4)
119- if : matrix.dependencies == 'highest' && matrix.php == '8.4'
120- run : composer update --no-interaction --no-progress --ignore-platform-req php
121-
122-
12390 - name : Download binaries
124- if : inputs.download-binaries == true && matrix.php != '8.4'
91+ if : inputs.download-binaries == true
12592 run : composer get:binaries
12693
127- - name : Download binaries (PHP 8.4)
128- if : inputs.download-binaries == true && matrix.php == '8.4'
129- run : cpx internal/dload get --no-interaction
130-
13194 - name : Run tests
13295 run : ${{ inputs.test-command }}
0 commit comments