-
-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (50 loc) · 1.44 KB
/
main.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
name: JSON linter + luacheck
on: [push, pull_request, workflow_dispatch]
env:
DBTYPE: mysql
DBUSER: root
jobs:
# PHP linters: phpcs, parallel-lint, etc.
linter:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: composer
- uses: actions/cache@v4
with:
path: ~/.composer/cache
key: buildcache-linter
- run: sudo apt-get install -y composer && composer install
- run: composer test
# Phan (PHP static analyzer)
phan:
runs-on: ubuntu-22.04
env:
branch: REL1_39
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: ast
tools: composer
- uses: actions/cache@v4
with:
path: |
~/.composer/cache
buildcache
key: buildcache-phan
- uses: edwardspec/github-action-build-mediawiki@v1
with:
branch: ${{ env.branch }}
noinstall: 1
- name: Install dependencies
run: |
rsync -a --exclude buildcache --exclude mediawiki --exclude .git . mediawiki/extensions/RelatedImages/
cd mediawiki/extensions/RelatedImages
composer install
- name: RUN -- phan
run: cd mediawiki/extensions/RelatedImages && ./vendor/bin/phan --analyze-twice