2020-12-31 22:10:24 +00:00
|
|
|
name: unit
|
2021-07-26 20:59:33 +00:00
|
|
|
on:
|
|
|
|
push:
|
2021-10-08 10:19:44 +00:00
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
workflow_dispatch:
|
2019-08-30 14:20:47 +00:00
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
2020-12-22 20:11:22 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-12-10 15:24:03 +00:00
|
|
|
php-version: [ 7.4, 8.0 ]
|
2020-12-22 20:11:22 +00:00
|
|
|
fail-fast: false
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Set up PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: ${{ matrix.php-version }}
|
|
|
|
tools: composer:v2
|
|
|
|
coverage: xdebug
|
2021-03-10 09:18:48 +00:00
|
|
|
extensions: pdo_sqlite, zip, gd
|
|
|
|
- name: Install PHP dependencies
|
|
|
|
uses: ramsey/composer-install@v1
|
|
|
|
with:
|
|
|
|
composer-options: --prefer-dist
|
2020-12-22 20:11:22 +00:00
|
|
|
- name: Generate app key
|
|
|
|
run: php artisan key:generate --quiet
|
|
|
|
- name: Run code style checker
|
|
|
|
run: composer cs
|
|
|
|
- name: Run static analysis
|
|
|
|
run: composer analyze -- --no-progress
|
2020-12-22 23:04:13 +00:00
|
|
|
- name: Run tests
|
|
|
|
run: composer coverage
|
2020-12-22 23:18:07 +00:00
|
|
|
- name: Upload coverage
|
|
|
|
uses: codecov/codecov-action@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|