Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b065956

Browse files
New workflow - test Slevomat CS against latest parser
1 parent a6e5311 commit b065956

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+
name: "Test Slevomat Coding Standard"
4+
5+
on:
6+
pull_request:
7+
push:
8+
branches:
9+
- "1.9.x"
10+
11+
jobs:
12+
tests:
13+
name: "Tests"
14+
runs-on: "ubuntu-latest"
15+
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
php-version:
20+
- "7.3"
21+
- "7.4"
22+
- "8.0"
23+
- "8.1"
24+
- "8.2"
25+
26+
steps:
27+
- name: "Checkout"
28+
uses: actions/checkout@v3
29+
30+
- name: "Checkout Slevomat Coding Standard"
31+
uses: actions/checkout@v3
32+
with:
33+
repository: slevomat/coding-standard
34+
path: slevomat-cs
35+
ref: 8.7.1
36+
37+
- name: "Install PHP"
38+
uses: "shivammathur/setup-php@v2"
39+
with:
40+
coverage: "none"
41+
php-version: "${{ matrix.php-version }}"
42+
43+
- name: "Install dependencies"
44+
working-directory: slevomat-cs
45+
run: "composer install --no-interaction --no-progress"
46+
47+
- name: "Remove stable phpdoc-parser"
48+
working-directory: slevomat-cs
49+
run: "rm -r vendor/phpstan/phpdoc-parser/src"
50+
51+
- name: "Remove top-level phpcs.xml"
52+
run: "rm phpcs.xml"
53+
54+
- name: "Copy phpdoc-parser"
55+
run: "cp -r src/ slevomat-cs/vendor/phpstan/phpdoc-parser/src"
56+
57+
- name: "Tests"
58+
working-directory: slevomat-cs
59+
run: "bin/phpunit"
60+
61+
- name: "PHPStan"
62+
working-directory: slevomat-cs
63+
run: "bin/phpstan analyse -c build/PHPStan/phpstan.neon"
64+
65+
- name: "PHPStan in tests"
66+
working-directory: slevomat-cs
67+
run: "bin/phpstan analyse -c build/PHPStan/phpstan.tests.neon"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /