-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (50 loc) · 1.29 KB
/
ci.yaml
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
---
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
run-tests:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
versions: [
{ php: "7.3", phpunit: "9" },
{ php: "7.4", phpunit: "9" },
{ php: "8.0", phpunit: "9" },
{ php: "8.1", phpunit: "10" },
]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Composer install
uses: php-actions/composer@v6
with:
php_version: ${{ matrix.versions.php }}
- name: Run unit tests
uses: php-actions/[email protected]
with:
configuration: phpunit.xml
version: ${{ matrix.versions.phpunit }}
php_version: ${{ matrix.versions.php }}
check-code-style:
name: Check code style
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Run php-cs-fixer
uses: docker://oskarstark/php-cs-fixer-ga
- name: Apply php-cs-fixer changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply php-cs-fixer changes