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,71 +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 : |
89- echo "::set-output name=dir::$(composer config cache-files-dir)"
90-
91- - name : Cache Composer Dependencies
92- uses : actions/cache@v3
79+ - name : Install dependencies with composer
80+ uses : ramsey/composer-install@v3
9381 with :
94- path : ${{ steps.composer-cache.outputs.dir }}
95- key : php-${{ matrix.php }}-${{ matrix.os }}-composer-${{ hashFiles('**/composer.lock') }}
96- restore-keys : |
97- php-${{ matrix.php }}-${{ matrix.os }}-composer-
98-
99- - name : Install lowest dependencies from composer.json
100- if : matrix.dependencies == 'lowest' && matrix.php != '8.4'
101- run : composer update --no-interaction --no-progress --prefer-lowest
102-
103- - name : Install lowest dependencies from composer.json ignoring ext-php constraint (PHP 8.4)
104- if : matrix.dependencies == 'lowest' && matrix.php == '8.4'
105- run : composer update --no-interaction --no-progress --prefer-lowest --ignore-platform-req php
106-
82+ dependency-versions : ${{ matrix.dependencies }}
10783
10884 - name : Validate lowest dependencies
10985 if : matrix.dependencies == 'lowest' && matrix.php == '8.1'
11086 env :
11187 COMPOSER_POOL_OPTIMIZER : 0
11288 run : vendor/bin/validate-prefer-lowest
11389
114-
115- - name : Install highest dependencies from composer.json
116- if : matrix.dependencies == 'highest' && matrix.php != '8.4'
117- run : composer update --no-interaction --no-progress
118-
119- - name : Install highest dependencies from composer.json ignoring ext-php constraint (PHP 8.4)
120- if : matrix.dependencies == 'highest' && matrix.php == '8.4'
121- run : composer update --no-interaction --no-progress --ignore-platform-req php
122-
123-
12490 - name : Download binaries
125- if : inputs.download-binaries == true && matrix.php != '8.4'
91+ if : inputs.download-binaries == true
12692 run : composer get:binaries
12793
128- - name : Download binaries (PHP 8.4)
129- if : inputs.download-binaries == true && matrix.php == '8.4'
130- run : cpx internal/dload get --no-interaction
131-
13294 - name : Run tests
13395 run : ${{ inputs.test-command }}
0 commit comments