49 regels
1.0 KiB
YAML
49 regels
1.0 KiB
YAML
|
name: CodeChecks
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
pull_request:
|
||
|
|
||
|
jobs:
|
||
|
tests:
|
||
|
runs-on: ubuntu-latest
|
||
|
|
||
|
strategy:
|
||
|
matrix:
|
||
|
php:
|
||
|
- '7.3'
|
||
|
- '7.4'
|
||
|
- '8.0'
|
||
|
|
||
|
name: PHP ${{ matrix.php }} tests
|
||
|
|
||
|
steps:
|
||
|
- name: Checkout
|
||
|
uses: actions/checkout@v2
|
||
|
|
||
|
- name: Set up PHP
|
||
|
uses: shivammathur/setup-php@v2
|
||
|
with:
|
||
|
php-version: ${{ matrix.php }}
|
||
|
coverage: xdebug
|
||
|
|
||
|
- name: Cache Composer packages
|
||
|
id: composer-cache
|
||
|
uses: actions/cache@v2
|
||
|
with:
|
||
|
path: vendor
|
||
|
key: ${{ runner.os }}-php${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
|
||
|
restore-keys: |
|
||
|
${{ runner.os }}-php${{ matrix.php }}-
|
||
|
|
||
|
- name: Composer
|
||
|
run: composer install --no-progress
|
||
|
|
||
|
- name: PHPUnit
|
||
|
run: vendor/bin/phpunit --coverage-clover=coverage.xml
|
||
|
|
||
|
- name: "Upload coverage to Codecov"
|
||
|
uses: "codecov/codecov-action@v2"
|
||
|
with:
|
||
|
fail_ci_if_error: true
|