@@ -13,14 +13,19 @@ jobs:
1313 runs-on : ubuntu-latest
1414
1515 steps :
16- - name : Set PHP Version
17- run : sudo update-alternatives --set php /usr/bin/php7.4
16+ - name : ' Checkout code '
17+ uses : actions/checkout@v3
1818
19- - name : Checkout
20- uses : actions/checkout@v2
19+ - name : ' Install PHP'
20+ uses : shivammathur/setup-php@v2
21+ with :
22+ coverage : none
23+ php-version : 7.4
24+ tools : composer:v2
25+ ini-values : date.timezone=UTC
2126
22- - name : Validate
23- run : composer validate --strict
27+ - name : Validate composer.json file
28+ run : composer validate --strict
2429
2530 stable-tests :
2631 name : Stable Tests
@@ -29,27 +34,19 @@ jobs:
2934 strategy :
3035 fail-fast : false
3136 matrix :
32- php-versions : [ '7.4', '8.0' ]
37+ php-version : ['7.4', '8.0']
3338
3439 steps :
35- - name : Set PHP Version
36- run : sudo update-alternatives --set php /usr/bin/php${{ matrix.php-versions }}
37-
38- - name : Get PHP Version
39- run : |
40- ver=$(php -v | grep -oP '(?<=PHP )\d.\d')
41- echo "::set-output name=version::$ver"
42- id : php-ver
43-
44- - name : Using PHP Version from matrix
45- run : |
46- echo "Runner is not using PHP Version defined in the php-versions matrix."
47- php -v
48- exit 1
49- if : steps.php-ver.outputs.version != matrix.php-versions
50-
51- - name : Checkout
52- uses : actions/checkout@v2
40+ - name : ' Checkout code'
41+ uses : actions/checkout@v3
42+
43+ - name : ' Install PHP'
44+ uses : shivammathur/setup-php@v2
45+ with :
46+ coverage : none
47+ php-version : ${{ matrix.php-version }}
48+ tools : composer:v2
49+ ini-values : date.timezone=UTC
5350
5451 - name : Install Composer Dependencies
5552 run : composer install --no-progress
0 commit comments