-
Notifications
You must be signed in to change notification settings - Fork 24
55 lines (42 loc) · 1.94 KB
/
php-static2.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: PHP Static Coding Tests Part 2
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '25 17 * * 1'
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup PHP with PCOV
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
ini-values: pcov.directory=.
coverage: pcov
extensions: mbstring, intl
- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Configure composer and dependencies
run: composer config allow-plugins.third-party/required-plugin true && composer config minimum-stability dev && composer config prefer-stable true && composer require mediawiki/oauthclient:2.0.0 && composer require phpstan/phpstan phan/phan
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist -vvv --no-progress
- name: PHP phpstan
run: php ./vendor/bin/phpstan --no-interaction analyse --memory-limit=2G constants/*.php html_headers.php Parameter.php user_messages.php constants.php big_jobs.php setup.php expandFns.php Zotero.php apiFunctions.php NameTools.php Comment.php Page.php WikipediaBot.php Template.php category.php generate_template.php linked_pages.php process_page.php authenticate.php
- name: PHP phan
run: php ./vendor/bin/phan --analyze-twice --allow-polyfill-parser --target-php-version='8.2' --minimum-target-php-version='8.2'
- name: PHP phan 8.3
run: php ./vendor/bin/phan --analyze-twice --allow-polyfill-parser --target-php-version='8.3' --minimum-target-php-version='8.3'