-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hubert Pałasz
authored and
Hubert Pałasz
committed
Nov 4, 2022
1 parent
637f886
commit fece87b
Showing
1 changed file
with
34 additions
and
0 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,34 @@ | ||
name: Run tests and analytics | ||
on: | ||
pull_request: | ||
branches: | ||
- 'master' | ||
- 'develop' | ||
- 'v*.*.*' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php_version: [7.0, 7.1, 7.2] | ||
coverage: [none, pcov] | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- name: Setup PHP with composer. | ||
uses: shivammathur/[email protected] | ||
with: | ||
php-version: ${{matrix.php_version}} | ||
tools: composer:v2 | ||
coverage: ${{matrix.coverage}} # XDebug disabled | ||
- name: Install composer dependencies | ||
run: | | ||
cp phpunit.xml.dist phpunit.xml | ||
composer install | ||
composer require --dev phpstan/phpstan | ||
- name: Run tests and analytics | ||
run: | | ||
vendor/phpunit/phpunit/phpunit -c phpunit.xml tests/ | ||
vendor/bin/phpstan analyse -l 7 lib/ |