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:
|
2020-10-14 17:07:59 +03:00
|
|
|
php: ['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
|
2020-02-29 10:34:13 +03:00
|
|
|
uses: actions/checkout@v2
|
2019-12-04 18:39:02 +03:00
|
|
|
|
2020-02-29 01:00:54 +03:00
|
|
|
- name: Cache Composer
|
2019-12-04 18:39:02 +03:00
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ~/.composer/cache/files
|
|
|
|
key: php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
|
|
|
|
|
|
|
|
- name: Setup PHP
|
2020-02-29 01:00:54 +03:00
|
|
|
uses: shivammathur/setup-php@v2
|
2019-12-04 18:39:02 +03:00
|
|
|
with:
|
|
|
|
php-version: ${{ matrix.php }}
|
2020-02-29 01:00:54 +03:00
|
|
|
extensions: 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
|
|
|
|
|
2020-02-29 01:00:54 +03:00
|
|
|
- name: Install NPM
|
|
|
|
run: npm install
|
|
|
|
|
|
|
|
- name: Compile assets
|
|
|
|
run: npm run production
|
|
|
|
|
|
|
|
- name: Install Composer
|
2019-12-04 18:39:02 +03:00
|
|
|
run: composer test
|
|
|
|
|
|
|
|
- name: Execute tests
|
2021-01-26 17:59:16 +03:00
|
|
|
run: php artisan test --parallel
|