1
0
mirror of https://github.com/danog/loop.git synced 2024-11-30 04:19:04 +01:00

Create main.yml

This commit is contained in:
Daniil Gentili 2020-07-23 14:21:26 +02:00 committed by GitHub
parent 59a9cd54d2
commit b3dd730459
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

42
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,42 @@
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: vendor/bin/coveralls build/logs/clover.xml