File tree Expand file tree Collapse file tree 4 files changed +59
-13
lines changed Expand file tree Collapse file tree 4 files changed +59
-13
lines changed Original file line number Diff line number Diff line change @@ -46,15 +46,19 @@ jobs:
4646 - uses : shivammathur/setup-php@v2
4747
4848 - name : Install root dependencies
49- run : composer install
49+ uses : ramsey/composer-install@v3
50+ with :
51+ working-directory : ${{ github.workspace }}
5052
5153 - name : Build root packages
5254 run : php .github/build-packages.php
5355
54- # We always install PHP deps because we of the UX Translator, which requires `var/translations` to exists
55- - name : Install App dependenies
56- run : composer update
57- working-directory : test_apps/encore-app
56+ # We always install PHP deps because of the UX Translator, which requires `var/translations` to exists
57+ - name : Install App dependencies
58+ uses : ramsey/composer-install@v3
59+ with :
60+ working-directory : test_apps/encore-app
61+ dependency-versions : highest
5862
5963 - if : matrix.ux-packages-source == 'php-vendor'
6064 name : Refresh dependencies from vendor/
Original file line number Diff line number Diff line change @@ -34,10 +34,16 @@ jobs:
3434 runs-on : ubuntu-latest
3535 steps :
3636 - uses : actions/checkout@v4
37+
3738 - uses : shivammathur/setup-php@v2
3839 with :
3940 php-version : ' 8.1'
40- - run : composer install
41+
42+ - name : Install root dependencies
43+ uses : ramsey/composer-install@v3
44+ with :
45+ working-directory : ${{ github.workspace }}
46+
4147 - name : php-cs-fixer
4248 run : ./vendor/bin/php-cs-fixer fix --dry-run --diff
4349
8389 php-version : 8.1
8490 tools : flex
8591
92+ - name : Get composer cache directory
93+ id : composer-cache
94+ run : |
95+ echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
96+
97+ - name : Cache packages dependencies
98+ uses : actions/cache@v4
99+ with :
100+ path : ${{ steps.composer-cache.outputs.dir }}
101+ key : ${{ runner.os }}-composer-packages-${{ matrix.php-version }}-${{ matrix.dependency-version }}-${{ matrix.symfony-version }}-${{ matrix.minimum-stability }}-${{ hashFiles('src/**/composer.json') }}
102+ restore-keys : |
103+ ${{ runner.os }}-composer-packages-${{ matrix.php-version }}-${{ matrix.dependency-version }}-${{ matrix.symfony-version }}-${{ matrix.minimum-stability }}
104+
86105 - name : Install root dependencies
87- run : composer install
106+ uses : ramsey/composer-install@v3
107+ with :
108+ working-directory : ${{ github.workspace }}
88109
89110 - name : Build root packages
90111 run : php .github/build-packages.php
Original file line number Diff line number Diff line change @@ -57,16 +57,22 @@ jobs:
5757 tools : flex
5858
5959 - name : Install root dependencies
60- run : composer install
60+ uses : ramsey/composer-install@v3
61+ with :
62+ working-directory : ${{ github.workspace }}
6163
6264 - name : Build root packages
6365 run : php .github/build-packages.php
6466
65- - name : Install dependencies with composer
67+ - name : Configure composer dependencies stability
68+ run : composer config minimum-stability ${{ matrix.minimum-stability || 'stable' }}
6669 working-directory : src/Turbo
67- run : |
68- composer config minimum-stability ${{ matrix.minimum-stability || 'stable' }}
69- composer update ${{ matrix.dependency-version == 'lowest' && '--prefer-lowest' || '' }} --no-progress --no-interaction
70+
71+ - name : Install dependencies with composer
72+ uses : ramsey/composer-install@v3
73+ with :
74+ working-directory : src/Turbo
75+ dependency-versions : ${{ matrix.dependency-version }}
7076
7177 - name : Install JavaScript dependencies
7278 working-directory : src/Turbo/tests/app
Original file line number Diff line number Diff line change 6868 php-version : ${{ matrix.php-version }}
6969 tools : flex
7070
71+ - name : Get composer cache directory
72+ id : composer-cache
73+ run : |
74+ echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
75+
76+ - name : Cache packages dependencies
77+ uses : actions/cache@v4
78+ with :
79+ path : ${{ steps.composer-cache.outputs.dir }}
80+ key : ${{ runner.os }}-composer-packages-${{ matrix.php-version }}-${{ matrix.dependency-version }}-${{ matrix.symfony-version }}-${{ matrix.minimum-stability }}-${{ hashFiles('src/**/composer.json') }}
81+ restore-keys : |
82+ ${{ runner.os }}-composer-packages-${{ matrix.php-version }}-${{ matrix.dependency-version }}-${{ matrix.symfony-version }}-${{ matrix.minimum-stability }}
83+
7184 - name : Install root dependencies
72- run : composer install
85+ uses : ramsey/composer-install@v3
86+ with :
87+ working-directory : ${{ github.workspace }}
7388
7489 - name : Build root packages
7590 run : php .github/build-packages.php
You can’t perform that action at this time.
0 commit comments