rector/.github/workflows/tests.yaml

50 lines
1.6 KiB
YAML

name: Tests
on:
pull_request: null
push:
branches:
- master
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.3', '7.4']
name: PHP ${{ matrix.php }} tests
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v1
with:
php-version: ${{ matrix.php }}
coverage: none # disable xdebug, pcov
# report phpunit errors into files-changed PR tab
# https://github.com/actions/toolkit/blob/master/docs/problem-matchers.md
- name: Setup Problem Matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- run: composer install --no-progress --ansi
- run: vendor/bin/phpunit
test_lowest_dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: git fetch --depth=100000 origin
# see https://github.com/shivammathur/setup-php
- uses: shivammathur/setup-php@v1
with:
php-version: 7.2
coverage: none
# report phpunit errors into files-changed PR tab
# https://github.com/actions/toolkit/blob/master/docs/problem-matchers.md
- name: Setup Problem Matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- run: composer update --no-progress # --prefer-lowest
- run: vendor/bin/phpunit