File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Setup
2
+ description : Sets up the build environment
3
+ inputs :
4
+ php-version :
5
+ description : " PHP version to install"
6
+ required : true
7
+ driver-version :
8
+ description : " MongoDB extension version to install"
9
+ required : true
10
+ php-ini-values :
11
+ description : " INI values to pass along to setup-php action"
12
+ required : false
13
+ default : " "
14
+
15
+ runs :
16
+ using : composite
17
+ steps :
18
+ - name : Setup cache environment
19
+ id : extcache
20
+ uses : shivammathur/cache-extensions@v1
21
+ with :
22
+ php-version : ${{ inputs.php-version }}
23
+ extensions : " mongodb-${{ inputs.driver-version }}"
24
+ key : " extcache-v1"
25
+
26
+ - name : Cache extensions
27
+ uses : actions/cache@v4
28
+ with :
29
+ path : ${{ steps.extcache.outputs.dir }}
30
+ key : ${{ steps.extcache.outputs.key }}
31
+ restore-keys : ${{ steps.extcache.outputs.key }}
32
+
33
+ - name : Install PHP
34
+ uses : shivammathur/setup-php@v2
35
+ with :
36
+ coverage : none
37
+ extensions : " mongodb-${{ inputs.driver-version }}"
38
+ php-version : " ${{ inputs.php-version }}"
39
+ tools : cs2pr
40
+ ini-values : " ${{ inputs.php-ini-values }}"
41
+
42
+ - name : Show driver information
43
+ run : " php --ri mongodb"
44
+ shell : bash
45
+
46
+ - name : Install dependencies with Composer
47
+
48
+ with :
49
+ # Revert when psalm supports PHP 8.4
50
+ # composer-options: "--no-suggest"
51
+ composer-options : " --no-suggest ${{ inputs.php-version == '8.4'
52
+ && '--ignore-platform-req=php+' || '' }}"
You can’t perform that action at this time.
0 commit comments