-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github actions support
- Loading branch information
Showing
3 changed files
with
59 additions
and
1 deletion.
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,43 @@ | ||
name: Static Analysis | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
composer-validate: | ||
name: Composer Validate | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Validate dependencies | ||
uses: php-actions/composer@v5 | ||
with: | ||
command: validate --strict | ||
|
||
phpstan: | ||
name: PHPStan | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.4 | ||
tools: composer:v2 | ||
coverage: none | ||
|
||
- name: Install Dependencies | ||
uses: nick-invision/retry@v1 | ||
with: | ||
timeout_minutes: 5 | ||
max_attempts: 5 | ||
command: composer install --no-interaction --no-progress | ||
|
||
- name: Execute PHPStan | ||
run: vendor/bin/phpstan analyze --no-progress src/ |
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,15 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
build-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: php-actions/composer@v5 | ||
- uses: php-actions/phpunit@v2 | ||
|
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