-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a phpstan lvl 6, validate cs-fixer, validate phpstan lvl3, add re…
…ctor action, upgrade php 8.2 with rector
- Loading branch information
Showing
35 changed files
with
3,773 additions
and
1,283 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
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,23 @@ | ||
name: PHPStan level 6 | ||
on: push | ||
jobs: | ||
phpstan: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: '**/vendor' | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- uses: php-actions/composer@v6 | ||
with: | ||
args: --prefer-dist | ||
php_version: '8.2' | ||
- name: PHPStan | ||
uses: php-actions/phpstan@v3 | ||
with: | ||
path: src/ | ||
level: 6 | ||
php_version: '8.2' |
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
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,30 @@ | ||
name: PHPUnit | ||
on: push | ||
jobs: | ||
phpunit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.2' | ||
tools: composer:v2 | ||
coverage: pcov | ||
- uses: actions/cache@v3 | ||
with: | ||
path: '**/vendor' | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- uses: php-actions/composer@v6 | ||
with: | ||
args: --prefer-dist | ||
php_version: '8.2' | ||
|
||
- name: Run tests & generate Coverage | ||
run: bin/phpunit functional --coverage-html var/coverage | ||
|
||
- name: Store coverage files | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
path: var/coverage |
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 |
---|---|---|
@@ -1,59 +1,37 @@ | ||
name: Quality (PHPStan level 4) | ||
name: Quality (PHPStan level 3) | ||
on: push | ||
jobs: | ||
cs-fixer: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.2' | ||
coverage: none | ||
- name: Cs-Fixer | ||
run: | | ||
wget -q https://cs.symfony.com/download/php-cs-fixer-v2.phar -O php-cs-fixer | ||
wget -q https://cs.symfony.com/download/php-cs-fixer-v3.phar -O php-cs-fixer | ||
chmod a+x php-cs-fixer | ||
PHP_CS_FIXER_IGNORE_ENV=true ./php-cs-fixer fix src --dry-run | ||
phpunit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.0' | ||
tools: composer:v2 | ||
coverage: pcov | ||
- uses: actions/cache@v2 | ||
with: | ||
path: '**/vendor' | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- uses: php-actions/composer@v5 | ||
with: | ||
args: --prefer-dist | ||
php_version: 8.0 | ||
- name: Run tests & generate Coverage | ||
run: bin/phpunit --configuration=phpunit.xml tests --coverage-html var/coverage --whitelist=src | ||
- name: Store coverage files | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
path: var/coverage | ||
|
||
phpstan: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/cache@v2 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: '**/vendor' | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-composer- | ||
- uses: php-actions/composer@v5 | ||
- uses: php-actions/composer@v6 | ||
with: | ||
args: --prefer-dist | ||
php_version: 8.0 | ||
php_version: '8.2' | ||
- name: PHPStan | ||
uses: php-actions/phpstan@v2 | ||
uses: php-actions/phpstan@v3 | ||
with: | ||
path: src/ | ||
level: 4 | ||
php_version: 8.0 | ||
level: 3 | ||
php_version: '8.2' |
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,29 @@ | ||
# github action that checks code with Rector | ||
name: Rector | ||
|
||
on: | ||
pull_request: null | ||
|
||
jobs: | ||
rector: | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.head.repo.full_name == 'php-etl/pipeline' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.2' | ||
coverage: none | ||
|
||
- uses: "ramsey/composer-install@v2" | ||
|
||
- run: bin/rector --ansi | ||
|
||
- # commit only to core contributors who have repository access | ||
if: github.event.pull_request.head.repo.full_name == github.repository | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: '[rector] Rector fixes' | ||
commit_author: 'GitHub Action <actions@github.com>' | ||
commit_user_email: 'action@github.com' |
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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
.idea/ | ||
vendor/ | ||
bin/ | ||
.php-cs-fixer.cache | ||
.phpunit.result.cache |
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
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.