2020-07-23 14:21:26 +02:00
|
|
|
name: build
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
jobs:
|
|
|
|
run:
|
|
|
|
runs-on: ${{ matrix.operating-system }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
operating-system: [ubuntu-latest, windows-latest, macos-latest]
|
|
|
|
php-versions: ['7.1', '7.2', '7.3', '7.4']
|
|
|
|
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: ${{ matrix.php-versions }}
|
|
|
|
extensions: mbstring, intl
|
|
|
|
coverage: xdebug
|
|
|
|
|
|
|
|
- name: Check environment
|
|
|
|
run: |
|
|
|
|
php --version
|
|
|
|
composer --version
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: composer update -n --prefer-dist
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
|
|
|
vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
|
|
|
|
PHP_CS_FIXER_IGNORE_ENV=1 php vendor/bin/php-cs-fixer --diff --dry-run -v fix
|
|
|
|
vendor/bin/psalm
|
|
|
|
|
|
|
|
- name: Collect code coverage
|
|
|
|
env:
|
|
|
|
COVERALLS_REPO_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
|
|
if: success()
|
2020-07-23 14:30:56 +02:00
|
|
|
run: |
|
|
|
|
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.2.0/php-coveralls.phar
|
|
|
|
php php-coveralls.phar
|