File tree Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ inputs:
11
11
description : " INI values to pass along to setup-php action"
12
12
required : false
13
13
default : " "
14
+ working-directory :
15
+ description : " The directory where composer.json is located, if it is not in the repository root."
16
+ required : false
14
17
15
18
runs :
16
19
using : composite
49
52
# Revert when psalm supports PHP 8.4
50
53
# composer-options: "--no-suggest"
51
54
composer-options : " --no-suggest ${{ inputs.php-version == '8.4' && '--ignore-platform-req=php+' || '' }}"
55
+ working-directory : " ${{ inputs.working-directory }}"
Original file line number Diff line number Diff line change
1
+ name : " Static Analysis"
2
+
3
+ on :
4
+ merge_group :
5
+ pull_request :
6
+ branches :
7
+ - " v*.*"
8
+ - " master"
9
+ - " feature/*"
10
+ push :
11
+ branches :
12
+ - " v*.*"
13
+ - " master"
14
+ - " feature/*"
15
+ workflow_call :
16
+ inputs :
17
+ ref :
18
+ description : " The git ref to check"
19
+ type : string
20
+ required : true
21
+
22
+ env :
23
+ PHP_VERSION : " 8.2"
24
+ # TODO: change to "stable" once 1.20.0 is released
25
+ # DRIVER_VERSION: "stable"
26
+ DRIVER_VERSION : " mongodb/mongo-php-driver@v1.20"
27
+
28
+ jobs :
29
+ psalm :
30
+ name : " Code Generator"
31
+ runs-on : " ubuntu-22.04"
32
+
33
+ steps :
34
+ - name : " Checkout"
35
+ uses : " actions/checkout@v4"
36
+ with :
37
+ ref : ${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.ref }}
38
+
39
+ - name : " Setup"
40
+ uses : " ./.github/actions/setup"
41
+ with :
42
+ php-version : ${{ env.PHP_VERSION }}
43
+ driver-version : ${{ env.DRIVER_VERSION }}
44
+ working-directory : " generator"
45
+
46
+ - name : " Run Generator"
47
+ run : " generator/generate"
48
+
49
+ - name : " Check file diff"
50
+ run : git add . -N && git diff --exit-code
You can’t perform that action at this time.
0 commit comments