2019-12-04 21:47:35 +03:00
|
|
|
name: Tests
|
2019-11-18 13:50:47 +03:00
|
|
|
|
2020-01-06 16:57:27 +03:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * *'
|
2019-11-18 13:50:47 +03:00
|
|
|
|
|
|
|
jobs:
|
2019-11-19 10:11:48 +03:00
|
|
|
tests:
|
2019-11-19 10:36:17 +03:00
|
|
|
|
2019-12-04 21:47:35 +03:00
|
|
|
name: PHP ${{ matrix.php }}
|
2019-11-19 10:36:17 +03:00
|
|
|
|
2019-11-18 13:50:47 +03:00
|
|
|
runs-on: ubuntu-latest
|
2019-11-19 10:36:17 +03:00
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2019-12-04 18:39:02 +03:00
|
|
|
php: ['7.2', '7.3', '7.4']
|
2019-11-19 10:36:17 +03:00
|
|
|
|
2019-11-18 13:50:47 +03:00
|
|
|
steps:
|
2019-12-04 18:39:02 +03:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Cache composer
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ~/.composer/cache/files
|
|
|
|
key: php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
|
|
|
|
|
|
|
|
- name: Setup PHP
|
|
|
|
uses: shivammathur/setup-php@v1
|
|
|
|
with:
|
|
|
|
php-version: ${{ matrix.php }}
|
2019-12-04 21:09:08 +03:00
|
|
|
extension-csv: bcmath, ctype, dom, fileinfo, intl, gd, json, mbstring, pdo, pdo_sqlite, openssl, sqlite, xml, zip
|
2019-12-04 18:39:02 +03:00
|
|
|
coverage: none
|
|
|
|
|
|
|
|
- name: Copy .env
|
|
|
|
run: cp .env.testing .env
|
|
|
|
|
|
|
|
- name: Install composer
|
|
|
|
run: composer test
|
|
|
|
|
|
|
|
- name: Execute tests
|
|
|
|
run: vendor/bin/phpunit
|