-
-
Notifications
You must be signed in to change notification settings - Fork 23
71 lines (61 loc) · 2.04 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
name: Code_Checks
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
tests:
environment: main
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.2']
stability: [prefer-stable]
minimum-stability: [stable]
symfony-version: [7.0.*]
is-current: [true]
include:
- php: '8.3'
symfony-version: 7.0.*
stability: prefer-stable
- php: '8.4'
symfony-version: 7.0.*
stability: prefer-stable
name: PHP ${{ matrix.php }} - ${{ matrix.symfony-version }} - ${{ matrix.stability }}
steps:
- uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.composer/cache/files
key: composer-packages-${{ hashFiles('composer.lock') }}
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
- name: Install dependencies
env:
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins symfony/flex
composer config minimum-stability ${{ matrix.minimum-stability }}
composer update --no-interaction --prefer-dist
- name: PHP-CS-Fixer
continue-on-error: ${{ !matrix.is-current }}
run: vendor/bin/php-cs-fixer fix --ansi -v --dry-run
- name: PHPStan
continue-on-error: ${{ !matrix.is-current }}
run: vendor/bin/phpstan analyse src tests --level 9
- name: Execute tests
env:
SYMFONY_DEPRECATIONS_HELPER: weak
run: vendor/bin/phpunit
- name: SonarCloud Scan
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
uses: sonarsource/sonarcloud-github-action@v2