66 runs-on : ubuntu-latest
77 steps :
88 - name : Checkout
9- uses : actions/checkout@v2
9+ uses : actions/checkout@v3
1010
1111 - name : PHP syntax checker 7.2
1212 uses : prestashop/github-action-php-lint/7.2@master
@@ -22,16 +22,16 @@ jobs:
2222 runs-on : ubuntu-latest
2323 steps :
2424 - name : Checkout
25- uses : actions/checkout@v2
25+ uses : actions/checkout@v3
2626
2727 - name : Cache vendor folder
28- uses : actions/cache@v2
28+ uses : actions/cache@v3
2929 with :
3030 path : vendor
3131 key : ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
3232
3333 - name : Cache composer folder
34- uses : actions/cache@v2
34+ uses : actions/cache@v3
3535 with :
3636 path : ~/.composer/cache
3737 key : php-composer-cache
@@ -46,16 +46,16 @@ jobs:
4646 runs-on : ubuntu-latest
4747 steps :
4848 - name : Checkout
49- uses : actions/checkout@v2
49+ uses : actions/checkout@v3
5050
5151 - name : Cache vendor folder
52- uses : actions/cache@v2
52+ uses : actions/cache@v3
5353 with :
5454 path : vendor
5555 key : ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
5656
5757 - name : Cache composer folder
58- uses : actions/cache@v2
58+ uses : actions/cache@v3
5959 with :
6060 path : ~/.composer/cache
6161 key : php-composer-cache
@@ -68,23 +68,32 @@ jobs:
6868 phpunit :
6969 name : PHPUnit
7070 runs-on : ubuntu-latest
71+ strategy :
72+ matrix :
73+ php-versions : ["7.2", "7.3", "8.0", "8.1"]
7174 steps :
7275 - name : Checkout
73- uses : actions/checkout@v2
76+ uses : actions/checkout@v3
77+
78+ - name : Setup PHP with Xdebug
79+ uses : shivammathur/setup-php@v2
80+ with :
81+ php-version : ${{ matrix.php-versions }}
82+ coverage : xdebug
7483
7584 - name : Cache vendor folder
76- uses : actions/cache@v2
85+ uses : actions/cache@v3
7786 with :
7887 path : vendor
79- key : ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
88+ key : ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}-${{ matrix.php-versions }}
8089
8190 - name : Cache composer folder
82- uses : actions/cache@v2
91+ uses : actions/cache@v3
8392 with :
8493 path : ~/.composer/cache
85- key : php-composer-cache
94+ key : php-composer-cache-${{ matrix.php-versions }}
8695
8796 - run : composer install
8897
8998 - name : Run PHPUnit
90- run : vendor/bin/phpunit
99+ run : vendor/bin/phpunit --coverage-text
0 commit comments