-
Notifications
You must be signed in to change notification settings - Fork 17
71 lines (59 loc) · 1.99 KB
/
php.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
name: GPS Messenger Bundle CI
on:
pull_request:
branches:
- master
jobs:
build:
name: PHP ${{ matrix.php-version }} Sf ${{ matrix.symfony-version }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- php-version: 8.2
symfony-version: 5.4.*
- php-version: 8.3
symfony-version: 5.4.*
- php-version: 8.2
symfony-version: 6.4.*
- php-version: 8.3
symfony-version: 6.4.*
- php-version: 8.4
symfony-version: 6.4.*
- php-version: 8.2
symfony-version: 7.2.*
- php-version: 8.3
symfony-version: 7.2.*
- php-version: 8.4
symfony-version: 7.2.*
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: composer:v2
- name: Validate composer.json
run: composer validate
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.json') }}-${{ matrix.symfony-version }}
restore-keys: |
composer-${{ runner.os }}-${{ matrix.php-version }}-
- name: Install dependencies
env:
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer update --prefer-dist --no-progress --no-ansi --no-interaction --no-scripts
- name: Run unit tests
run: vendor/bin/phpunit
- name: Run style tests
run: vendor/bin/ecs check -vv
- name: Run static analyse phpstan
run: vendor/bin/phpstan analyse --error-format=github
- name: Run static analyse psalm
run: vendor/bin/psalm --php-version=${{ matrix.php-version }}