77
77
uses : " shivammathur/setup-php@v2"
78
78
with :
79
79
coverage : " none"
80
- extensions : " none, curl, dom, json, mbstring, tokenizer, xml, xmlwriter"
80
+ extensions : " none, curl, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter"
81
81
php-version : " ${{ matrix.php-version }}"
82
82
83
83
- name : " Set up problem matchers for PHP"
@@ -102,6 +102,49 @@ jobs:
102
102
- name : " Run friendsofphp/php-cs-fixer"
103
103
run : " vendor/bin/php-cs-fixer fix --ansi --config=.php-cs-fixer.php --diff --dry-run --show-progress=dots --verbose"
104
104
105
+ static-code-analysis :
106
+ name : " Static Code Analysis"
107
+
108
+ runs-on : " ubuntu-latest"
109
+
110
+ strategy :
111
+ matrix :
112
+ php-version :
113
+ - " 8.2"
114
+
115
+ dependencies :
116
+ - " locked"
117
+
118
+ steps :
119
+ - name : " Checkout"
120
+ uses : " actions/checkout@v3"
121
+
122
+ - name : " Set up PHP"
123
+ uses : " shivammathur/setup-php@v2"
124
+ with :
125
+ coverage : " none"
126
+ extensions : " none, dom, json, mbstring, opcache, pcntl, posix, simplexml, tokenizer"
127
+ php-version : " ${{ matrix.php-version }}"
128
+
129
+ - name : " Set up problem matchers for PHP"
130
+ run : " echo \" ::add-matcher::${{ runner.tool_cache }}/php.json\" "
131
+
132
+ - name : " Determine composer cache directory"
133
+ run : " echo \" COMPOSER_CACHE_DIR=$(composer config cache-dir)\" >> $GITHUB_ENV"
134
+
135
+ - name : " Cache dependencies installed with composer"
136
+ uses : " actions/cache@v3"
137
+ with :
138
+ path : " ${{ env.COMPOSER_CACHE_DIR }}"
139
+ key : " php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.lock') }}"
140
+ restore-keys : " php-${{ matrix.php-version }}-composer-"
141
+
142
+ - name : " Install dependencies with composer"
143
+ run : " composer install --ansi --no-interaction --no-progress"
144
+
145
+ - name : " Run vimeo/psalm"
146
+ run : " vendor/bin/psalm --config=psalm.xml --output-format=github --shepherd --show-info=false --stats --threads=4"
147
+
105
148
tests :
106
149
name : " Tests"
107
150
0 commit comments