2021-01-30 14:43:12 +03:00
|
|
|
name: Tests
|
2020-11-25 10:33:50 +03:00
|
|
|
|
|
|
|
on:
|
2021-01-30 14:43:12 +03:00
|
|
|
push: ~
|
|
|
|
pull_request: ~
|
2020-11-25 10:33:50 +03:00
|
|
|
|
|
|
|
jobs:
|
2021-01-30 14:43:12 +03:00
|
|
|
php:
|
2020-11-25 10:33:50 +03:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-01-30 09:39:30 +03:00
|
|
|
php-versions: [ '7.3', '7.4', '8.0' ]
|
2020-11-25 10:33:50 +03:00
|
|
|
|
2021-08-18 22:17:06 +03:00
|
|
|
runs-on: 'Ubuntu-20.04'
|
2020-11-25 10:33:50 +03:00
|
|
|
|
|
|
|
steps:
|
|
|
|
|
2021-01-30 14:43:12 +03:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: ${{ matrix.php-versions }}
|
|
|
|
tools: none
|
2020-11-25 10:33:50 +03:00
|
|
|
|
2021-01-30 14:43:12 +03:00
|
|
|
- name: Install dependencies
|
|
|
|
run: composer install --prefer-dist --no-progress --no-suggest
|
2020-11-25 10:33:50 +03:00
|
|
|
|
2021-01-30 14:43:12 +03:00
|
|
|
- name: PHP Unit Tests
|
|
|
|
run: vendor/bin/phpunit
|
|
|
|
|
|
|
|
lowest:
|
|
|
|
name: Lowest deps
|
2021-08-18 22:17:06 +03:00
|
|
|
runs-on: ubuntu-20.04
|
2021-01-30 14:43:12 +03:00
|
|
|
steps:
|
|
|
|
- name: Set up PHP
|
|
|
|
uses: shivammathur/setup-php@2.9.0
|
|
|
|
with:
|
|
|
|
php-version: 7.4
|
|
|
|
coverage: pcov
|
2020-11-25 10:33:50 +03:00
|
|
|
|
2021-01-30 14:43:12 +03:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
2020-11-25 10:33:50 +03:00
|
|
|
|
2021-01-30 14:43:12 +03:00
|
|
|
- name: Download dependencies
|
|
|
|
run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable --prefer-lowest
|
2020-11-25 10:33:50 +03:00
|
|
|
|
2021-01-30 14:43:12 +03:00
|
|
|
- name: Run tests
|
2021-08-18 22:17:06 +03:00
|
|
|
run: vendor/bin/phpunit
|