-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (88 loc) · 2.62 KB
/
build.yaml
File metadata and controls
107 lines (88 loc) · 2.62 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Build
on:
push:
branches:
- main
pull_request:
jobs:
coding-standards:
name: "Coding Standards"
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@2.24.0
with:
php-version: 8.2
tools: composer
- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Run coding standards
run: composer lint:cs
static-analysis:
name: "Static Analysis"
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@2.24.0
with:
php-version: 8.2
tools: composer
- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Run coding standards
run: composer lint:phpstan
tests:
name: "Tests"
runs-on: "ubuntu-latest"
needs: ["static-analysis", "coding-standards"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@2.24.0
with:
php-version: 8.2
tools: composer
- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
# Enable for db integration tests
# - uses: isbang/compose-action@v1.4.1
# with:
# compose-file: "./docker-compose.yml"
- name: Run tests
run: composer test
# Enable for db integration tests
# env:
# DATABASE_URL: "mysql://admin:changeme@127.0.0.1:3306/integration?serverVersion=8:0"
- name: Cache reports
uses: actions/cache@v3
with:
key: ${{ runner.os }}-report-${{ github.sha }}
path: reports/
mutation-testing:
name: "Mutation Testing"
runs-on: "ubuntu-latest"
needs: "tests"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@2.24.0
with:
php-version: 8.2
tools: composer
- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Restore reports from cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-report-${{ github.sha }}
restore-keys: ${{ runner.os }}-report-${{ github.sha }}
fail-on-cache-miss: true
path: reports/
- name: Run infection
run: composer mutation-testing