-
Notifications
You must be signed in to change notification settings - Fork 23
70 lines (51 loc) · 1.96 KB
/
php.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: "Check plugin code"
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Check PHP Version
run: php --version
- name: Install dependencies
run: composer install --prefer-dist --no-progress
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md
- name: Run PHPCS design on plugin
run: vendor/bin/phpcs simple-jwt-login/ --extensions=php
- name: Run PHPMD design on plugin
run: vendor/bin/phpmd simple-jwt-login/ text design
- name: Run PHPMD cleancode on plugin
run: vendor/bin/phpmd simple-jwt-login/ text cleancode
- name: Run PHPMD unusedcode on plugin
run: vendor/bin/phpmd simple-jwt-login/ text unusedcode
- name: Run PHPMD naming on plugin
run: vendor/bin/phpmd simple-jwt-login/ text naming
- name: Run PHPMD controversial on plugin
run: vendor/bin/phpmd simple-jwt-login/ text controversial
- name: Run phpstan on plugin
run: vendor/bin/phpstan analyse simple-jwt-login -c phpstan.neon --memory-limit=256M
- name: Run PHPCS design on tests
run: vendor/bin/phpcs tests/
- name: Run PHPMD design on tests
run: vendor/bin/phpmd tests text design
- name: Run PHPMD unusedcode on tests
run: vendor/bin/phpmd tests/ text unusedcode
- name: Run PHPMD naming on tests
run: vendor/bin/phpmd tests/ text naming
- name: Run PHPMD controversial on tests
run: vendor/bin/phpmd tests/ text controversial