-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from Codeception/code-style
Code style
- Loading branch information
Showing
30 changed files
with
458 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Static analysis | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
phpcs: | ||
name: Code style | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.1' | ||
ini-values: memory_limit=-1, date.timezone='UTC' | ||
tools: phpcs, phpstan | ||
|
||
- name: Validate composer.json | ||
run: composer validate | ||
|
||
- name: Install dependencies | ||
run: composer update | ||
|
||
- name: Generate action files | ||
run: vendor/bin/codecept build | ||
|
||
- name: Check production code style | ||
run: phpcs src/ | ||
|
||
- name: Check test code style | ||
run: phpcs tests/ --standard=tests/phpcs.xml | ||
|
||
- name: Static analysis of production code | ||
run: phpstan analyze src/ --level=1 | ||
|
||
- name: Static analysis of test code | ||
run: phpstan analyze tests/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="Codeception"> | ||
<description>Codeception code standard</description> | ||
<rule ref="PSR12"> | ||
<exclude name="PSR2.Methods.MethodDeclaration.Underscore"/> | ||
</rule> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.