-
Notifications
You must be signed in to change notification settings - Fork 0
Unit tests, psalm & phpcs #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8d5912e
unit tests, psalm & phpcs
marioradu05 5945ac5
requsted changes
marioradu05 8cceb36
symfony insights updates
marioradu05 f0272a8
requested changes
marioradu05 d896fcc
fix failing unit test
marioradu05 a51e3d7
cs fix
marioradu05 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,46 @@ | ||
| on: | ||
| - push | ||
|
|
||
| name: Run phpcs checks | ||
|
|
||
| jobs: | ||
| mutation: | ||
| name: PHP ${{ matrix.php }}-${{ matrix.os }} | ||
|
|
||
| runs-on: ${{ matrix.os }} | ||
|
|
||
| strategy: | ||
| matrix: | ||
| os: | ||
| - ubuntu-latest | ||
|
|
||
| php: | ||
| - "8.1" | ||
| - "8.2" | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Install PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: "${{ matrix.php }}" | ||
| tools: composer:v2, cs2pr | ||
| coverage: none | ||
|
|
||
| - name: Determine composer cache directory | ||
| run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV | ||
|
|
||
| - name: Cache dependencies installed with composer | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: ${{ env.COMPOSER_CACHE_DIR }} | ||
| key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} | ||
| restore-keys: | | ||
| php${{ matrix.php }}-composer- | ||
| - name: Install dependencies with composer | ||
| run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi | ||
|
|
||
| - name: Run phpcs checks | ||
| run: vendor/bin/phpcs |
This file contains hidden or 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,46 @@ | ||
| on: | ||
| - push | ||
|
|
||
| name: Run static analysis | ||
|
|
||
| jobs: | ||
| mutation: | ||
| name: PHP ${{ matrix.php }}-${{ matrix.os }} | ||
|
|
||
| runs-on: ${{ matrix.os }} | ||
|
|
||
| strategy: | ||
| matrix: | ||
| os: | ||
| - ubuntu-latest | ||
|
|
||
| php: | ||
| - "8.1" | ||
| - "8.2" | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Install PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: "${{ matrix.php }}" | ||
| tools: composer:v2, cs2pr | ||
| coverage: none | ||
|
|
||
| - name: Determine composer cache directory | ||
| run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV | ||
|
|
||
| - name: Cache dependencies installed with composer | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: ${{ env.COMPOSER_CACHE_DIR }} | ||
| key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} | ||
| restore-keys: | | ||
| php${{ matrix.php }}-composer- | ||
| - name: Install dependencies with composer | ||
| run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi | ||
|
|
||
| - name: Run static analysis | ||
| run: vendor/bin/psalm --no-cache --output-format=github --show-info=false --threads=4 |
This file contains hidden or 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,46 @@ | ||
| on: | ||
| - push | ||
|
|
||
| name: Run PHPUnit tests | ||
|
|
||
| jobs: | ||
| mutation: | ||
| name: PHP ${{ matrix.php }}-${{ matrix.os }} | ||
|
|
||
| runs-on: ${{ matrix.os }} | ||
|
|
||
| strategy: | ||
| matrix: | ||
| os: | ||
| - ubuntu-latest | ||
|
|
||
| php: | ||
| - "8.1" | ||
| - "8.2" | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Install PHP | ||
| uses: shivammathur/setup-php@v2 | ||
| with: | ||
| php-version: "${{ matrix.php }}" | ||
| tools: composer:v2, cs2pr | ||
| coverage: none | ||
|
|
||
| - name: Determine composer cache directory | ||
| run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV | ||
|
|
||
| - name: Cache dependencies installed with composer | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: ${{ env.COMPOSER_CACHE_DIR }} | ||
| key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} | ||
| restore-keys: | | ||
| php${{ matrix.php }}-composer- | ||
| - name: Install dependencies with composer | ||
| run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi | ||
|
|
||
| - name: Run PHPUnit tests | ||
| run: vendor/bin/phpunit --colors=always |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| osslifecycle=active | ||
| osslifecycle=maintained |
This file contains hidden or 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 hidden or 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 hidden or 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,20 @@ | ||
| <?xml version="1.0"?> | ||
| <ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd"> | ||
|
|
||
| <arg name="basepath" value="."/> | ||
| <arg name="cache" value=".phpcs-cache"/> | ||
| <arg name="colors"/> | ||
| <arg name="extensions" value="php"/> | ||
| <arg name="parallel" value="80"/> | ||
|
|
||
| <!-- Show progress --> | ||
| <arg value="p"/> | ||
|
|
||
| <!-- Paths to check --> | ||
| <file>src</file> | ||
| <file>test</file> | ||
|
|
||
| <!-- Include all rules from the Laminas Coding Standard --> | ||
| <rule ref="LaminasCodingStandard"/> | ||
| </ruleset> |
This file contains hidden or 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,14 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.2/phpunit.xsd" bootstrap="./vendor/autoload.php" colors="true"> | ||
| <testsuites> | ||
| <testsuite name="dot-form Test Suite"> | ||
| <directory>./test</directory> | ||
| </testsuite> | ||
| </testsuites> | ||
| <coverage/> | ||
| <source> | ||
| <include> | ||
| <directory suffix=".php">./src</directory> | ||
| </include> | ||
| </source> | ||
| </phpunit> |
This file contains hidden or 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,17 @@ | ||
| <?xml version="1.0"?> | ||
| <psalm | ||
| errorLevel="2" | ||
|
alexmerlin marked this conversation as resolved.
|
||
| resolveFromConfigFile="true" | ||
| findUnusedCode="false" | ||
| findUnusedBaselineEntry="true" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xmlns="https://getpsalm.org/schema/config" | ||
| xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" | ||
| > | ||
| <projectFiles> | ||
| <directory name="src" /> | ||
| <ignoreFiles> | ||
| <directory name="vendor" /> | ||
| </ignoreFiles> | ||
| </projectFiles> | ||
| </psalm> | ||
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.