-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (37 loc) · 1.03 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
name: 'CI Pipeline'
on:
push:
branches: [ main ]
pull_request:
workflow_call:
jobs:
static-code-analyses:
name: 'Static code analyses'
runs-on: 'ubuntu-22.04'
strategy:
fail-fast: true
matrix:
php-version:
- 7.4
- 8.0
- 8.1
steps:
- uses: 'actions/checkout@v3'
- name: 'Setup PHP'
uses: 'shivammathur/setup-php@v2'
with:
php-version: ${{ matrix.php-version }}
tools: 'composer:v2'
- name: 'Cache composer dependencies'
uses: 'actions/cache@v3'
with:
key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
path: ~/.cache/composer
- name: 'Install composer dependencies'
run: 'composer install --no-progress --no-interaction'
- name: 'Run PHP_CodeSniffer'
run: '.build/bin/phpcs'
- name: 'Run phpstan'
run: '.build/bin/phpstan'
- name: 'Run rector'
run: '.build/bin/rector process --dry-run'