forked from squizlabs/PHP_CodeSniffer
-
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.
CI: switch to GitHub Actions - step 1: phpstan
This commit: * Adds a GH Actions workflow for the PHPStan check which was previously run on Travis. * Removes that part of the `.travis.yml` configuration. Notes: Builds will run on all pushes and on pull requests, with the exception of those just modifying files which are irrelevant to this workflow.
- Loading branch information
Showing
2 changed files
with
38 additions
and
16 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,38 @@ | ||
name: PHPStan | ||
|
||
on: | ||
# Run on all pushes and on all pull requests. | ||
# Prevent the build from running when there are only irrelevant changes. | ||
push: | ||
paths-ignore: | ||
- '**.md' | ||
pull_request: | ||
paths-ignore: | ||
- '**.md' | ||
|
||
jobs: | ||
phpstan: | ||
name: "PHP: 7.4 | PHPStan" | ||
|
||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
coverage: none | ||
|
||
- name: 'Composer: require PHPStan' | ||
run: composer require --no-update --dev phpstan/phpstan | ||
|
||
# Install dependencies and handle caching in one go. | ||
# @link https://github.com/marketplace/actions/install-composer-dependencies | ||
- name: Install Composer dependencies | ||
uses: "ramsey/composer-install@v1" | ||
|
||
- name: Run PHPStan | ||
run: vendor/bin/phpstan analyse --configuration=phpstan.neon |
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