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:
46
46
- uses : shivammathur/setup-php@v2
47
47
48
48
- name : Install root dependencies
49
- run : composer install
49
+ uses : ramsey/composer-install@v3
50
+ with :
51
+ working-directory : ${{ github.workspace }}
50
52
51
53
- name : Build root packages
52
54
run : php .github/build-packages.php
53
55
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
58
62
59
63
- if : matrix.ux-packages-source == 'php-vendor'
60
64
name : Refresh dependencies from vendor/
Original file line number Diff line number Diff line change @@ -34,10 +34,16 @@ jobs:
34
34
runs-on : ubuntu-latest
35
35
steps :
36
36
- uses : actions/checkout@v4
37
+
37
38
- uses : shivammathur/setup-php@v2
38
39
with :
39
40
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
+
41
47
- name : php-cs-fixer
42
48
run : ./vendor/bin/php-cs-fixer fix --dry-run --diff
43
49
83
89
php-version : 8.1
84
90
tools : flex
85
91
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
+
86
105
- name : Install root dependencies
87
- run : composer install
106
+ uses : ramsey/composer-install@v3
107
+ with :
108
+ working-directory : ${{ github.workspace }}
88
109
89
110
- name : Build root packages
90
111
run : php .github/build-packages.php
Original file line number Diff line number Diff line change @@ -57,16 +57,22 @@ jobs:
57
57
tools : flex
58
58
59
59
- name : Install root dependencies
60
- run : composer install
60
+ uses : ramsey/composer-install@v3
61
+ with :
62
+ working-directory : ${{ github.workspace }}
61
63
62
64
- name : Build root packages
63
65
run : php .github/build-packages.php
64
66
65
- - name : Install dependencies with composer
67
+ - name : Configure composer dependencies stability
68
+ run : composer config minimum-stability ${{ matrix.minimum-stability || 'stable' }}
66
69
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 }}
70
76
71
77
- name : Install JavaScript dependencies
72
78
working-directory : src/Turbo/tests/app
Original file line number Diff line number Diff line change 68
68
php-version : ${{ matrix.php-version }}
69
69
tools : flex
70
70
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
+
71
84
- name : Install root dependencies
72
- run : composer install
85
+ uses : ramsey/composer-install@v3
86
+ with :
87
+ working-directory : ${{ github.workspace }}
73
88
74
89
- name : Build root packages
75
90
run : php .github/build-packages.php
You can’t perform that action at this time.
0 commit comments