@@ -7,7 +7,7 @@ on: # yamllint disable-line rule:truthy
77 - " main"
88
99env :
10- DEFAULT_PHP_VERSION : " 8.1 "
10+ DEFAULT_PHP_VERSION : " 8.2 "
1111 RUN_ENVIRONMENT : " local"
1212
1313jobs :
1818 fail-fast : false
1919 matrix :
2020 php :
21- - ' 8.1'
2221 - ' 8.2'
2322 - ' 8.3'
2423 - ' 8.4'
@@ -34,10 +33,19 @@ jobs:
3433 php-version : " ${{ matrix.php }}"
3534 extensions : ' inotify, pcntl'
3635
37- - name : " Install dependencies with Composer"
38- uses : ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520
36+ - name : " Get Composer cache directory"
37+ id : composer-cache
38+ run : echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
39+
40+ - name : " Cache Composer dependencies"
41+ uses : actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
3942 with :
40- dependency-versions : " locked"
43+ path : ${{ steps.composer-cache.outputs.dir }}
44+ key : php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
45+ restore-keys : php-${{ matrix.php }}-composer-
46+
47+ - name : " Install dependencies with Composer"
48+ run : composer install --no-interaction --no-progress --prefer-dist
4149
4250 - name : " Run unit tests"
4351 run : " make test-unit ENV=${{ env.RUN_ENVIRONMENT }}"
@@ -59,10 +67,19 @@ jobs:
5967 php-version : " ${{ env.DEFAULT_PHP_VERSION }}"
6068 extensions : ' inotify, pcntl'
6169
62- - name : " Install dependencies with Composer"
63- uses : ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520
70+ - name : " Get Composer cache directory"
71+ id : composer-cache
72+ run : echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
73+
74+ - name : " Cache Composer dependencies"
75+ uses : actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
6476 with :
65- dependency-versions : " locked"
77+ path : ${{ steps.composer-cache.outputs.dir }}
78+ key : php-${{ env.DEFAULT_PHP_VERSION }}-composer-${{ hashFiles('**/composer.lock') }}
79+ restore-keys : php-${{ env.DEFAULT_PHP_VERSION }}-composer-
80+
81+ - name : " Install dependencies with Composer"
82+ run : composer install --no-interaction --no-progress --prefer-dist
6683
6784 - name : " Check for normalized composer.json"
6885 run : " composer normalize --dry-run"
@@ -96,10 +113,19 @@ jobs:
96113 php-version : " ${{ env.DEFAULT_PHP_VERSION }}"
97114 extensions : ' inotify, pcntl'
98115
99- - name : " Install dependencies with Composer"
100- uses : ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520
116+ - name : " Get Composer cache directory"
117+ id : composer-cache
118+ run : echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"
119+
120+ - name : " Cache Composer dependencies"
121+ uses : actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
101122 with :
102- dependency-versions : " locked"
123+ path : ${{ steps.composer-cache.outputs.dir }}
124+ key : php-${{ env.DEFAULT_PHP_VERSION }}-composer-${{ hashFiles('**/composer.lock') }}
125+ restore-keys : php-${{ env.DEFAULT_PHP_VERSION }}-composer-
126+
127+ - name : " Install dependencies with Composer"
128+ run : composer install --no-interaction --no-progress --prefer-dist
103129
104130 - name : " Validate monorepo"
105131 run : " make test-monorepo ENV=${{ env.RUN_ENVIRONMENT }}"
0 commit comments