-
Notifications
You must be signed in to change notification settings - Fork 438
66 lines (63 loc) · 1.82 KB
/
lint.yaml
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
name: CS Test Suite
on:
push:
branches: [ main ]
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
style_phpcs:
runs-on: ubuntu-latest
name: PHP Style Check
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- name: Install Dependencies
run: composer global require "squizlabs/php_codesniffer:3.*"
- name: Run PHPCS Code Style Checker
run: ~/.composer/vendor/bin/phpcs --standard=phpcs-ruleset.xml -p
style_csfixer:
name: PHP CS Fixer
uses: GoogleCloudPlatform/php-tools/.github/workflows/code-standards.yml@main
with:
config: GoogleCloudPlatform/php-tools/.php-cs-fixer.default.php@main
exclude-patterns: |
[
"#.*/src/V[0-9]+#",
"#.*/src/.*/V[0-9]+#",
"#.*/(tests|samples|metadata)#",
"vendor",
"dev",
"docs",
"AccessContextManager/src/Type",
"Asset/external",
"BigQueryDataExchange/src/Common",
"CommonProtos",
"Core/src/Testing",
"GSuiteAddOns/external",
"OsLogin/src/Common",
"LongRunning/src/ApiCore/LongRunning",
"LongRunning/src/LongRunning",
"Translate/src/Connection",
"Translate/src/TranslateClient.php"
]
staticanalysis:
runs-on: ubuntu-latest
name: PHPStan Static Analysis
steps:
- uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- name: "Install dependencies"
run: |
composer --no-interaction --no-ansi --no-progress update
composer --no-interaction --no-ansi --no-progress update -d dev
- name: Run Static Analysis
run: |
dev/sh/static-analysis