Skip to content

QC (PR #179)

QC (PR #179) #84

Workflow file for this run

name: QC
run-name: 'QC (PR #${{ github.event.pull_request.number }})'
on:
pull_request:
types: [opened, synchronize, reopened]
workflow_call:
workflow_dispatch:
concurrency:
group: qc-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
phpstan:
name: Static Type Analysis (PHPStan)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
coverage: none
- name: Install dependencies
uses: ramsey/composer-install@v3
- name: run PHPStan
run: composer test:types
phpunit:
name: Unit Tests (PHPUnit)
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: choremanager
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
coverage: none
- name: Install dependencies
uses: ramsey/composer-install@v3
- name: run phpunit
run: composer test:unit
env:
APP_KEY: base64:UmeUVSBI8wMTAzYlIWXQOf/SoBR116L3jozOtnnUAyY=
DB_CONNECTION: mysql
DB_DATABASE: choremanager
DB_USERNAME: root
DB_PASSWORD: root
autoloader:
name: PSR-4 Autoloader
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
coverage: none
- name: Install dependencies
uses: ramsey/composer-install@v3
- name: Check compliance with PSR-4
run: composer test:psr4