-
Notifications
You must be signed in to change notification settings - Fork 4
implemented unit tests, added phpcs, static-analysis and run unit tes… #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
23f22ba
implemented unit tests, added phpcs, static-analysis and run unit tes…
poprazvan17 869e5af
implemented unit tests, added phpcs, static-analysis and run unit tes…
poprazvan17 5c75e97
implemented unit tests, added phpcs, static-analysis and run unit tes…
poprazvan17 8870d4e
added symfony Insight badge
poprazvan17 0da3614
modified from crlf to lf
poprazvan17 6e3ba2e
modified from crlf to lf
poprazvan17 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,47 @@ | ||
| 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 |
|---|---|---|
| @@ -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,10 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" | ||
| bootstrap="vendor/autoload.php"> | ||
| <testsuites> | ||
| <testsuite name="Dot Authentication Test Suite"> | ||
| <directory>./test</directory> | ||
| </testsuite> | ||
| </testsuites> | ||
| </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,15 @@ | ||
| <?xml version="1.0"?> | ||
| <psalm | ||
| errorLevel="4" | ||
| 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.