koel/.github/workflows/unit.yml

41 lines
1 KiB
YAML
Raw Normal View History

name: Backend Unit Tests
2021-07-26 20:59:33 +00:00
on:
push:
branches:
- master
- next
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:
php-version: [ 7.4, 8.0, 8.1 ]
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
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 }}