-
Notifications
You must be signed in to change notification settings - Fork 1
85 lines (71 loc) · 2 KB
/
qc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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