-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change phpstan action on pull request, add a phpstan lvl 6
- Loading branch information
Showing
9 changed files
with
121 additions
and
47 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
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
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 @@ | ||
# github action that checks code with Rector | ||
name: Rector | ||
|
||
on: pull_request | ||
|
||
jobs: | ||
rector: | ||
# Don't run on forks. | ||
if: github.repository == 'php-etl/packaging-contracts' | ||
runs-on: ubuntu-latest | ||
steps: | ||
# workaround for missing secret in fork PRs - see https://github.com/actions/checkout/issues/298 | ||
# see https://github.com/rectorphp/rector/commit/d395e1c28b8e6a56711dcc2e10490a82965850e4 | ||
- | ||
if: github.event.pull_request.head.repo.full_name == github.repository | ||
uses: actions/checkout@v3 | ||
with: | ||
# Must be used to trigger workflow after push | ||
token: ${{ secrets.ACCESS_TOKEN }} | ||
|
||
# in forks, the token is not available - so we cannot use it | ||
- | ||
if: github.event.pull_request.head.repo.full_name != github.repository | ||
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 +1,2 @@ | ||
/vendor/ | ||
bin/ |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.