-
Notifications
You must be signed in to change notification settings - Fork 7
110 lines (88 loc) · 2.69 KB
/
code_checks.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
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
108
109
110
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.2']
stability: [ prefer-stable ]
include:
- php: '8.2'
stability: prefer-stable
- php: '8.3'
stability: prefer-stable
- php: '8.4'
stability: prefer-stable
name: PHP ${{ matrix.php }} - ${{ matrix.symfony-version }} - ${{ matrix.stability }}
steps:
- uses: actions/checkout@v4
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache dependencies
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
# use PHP of specific version
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
- name: Install dependencies
run: |
composer install --prefer-dist --no-progress
- name: Execute tests
run: composer phpunit
cs-and-rector:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
contents: write
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 8.3
coverage: none
- name: Cache dependencies
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: dependencies-php-8.3-composer-${{ hashFiles('composer.json') }}
- run: |
composer install --prefer-dist --no-progress
composer cs-fix
composer rector-fix
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply CS/Rector changes
phpstan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 8.3
coverage: none
- name: Cache dependencies
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: dependencies-php-8.3-composer-${{ hashFiles('composer.json') }}
- run: composer install --prefer-dist --no-progress
- run: composer phpstan