1
0
mirror of https://github.com/danog/loop.git synced 2024-12-02 17:27:48 +01:00
loop/.github/workflows/main.yml

45 lines
1.2 KiB
YAML

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()
run: |
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.2.0/php-coveralls.phar
php php-coveralls.phar