-
Notifications
You must be signed in to change notification settings - Fork 7
79 lines (79 loc) · 3.38 KB
/
analysis.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
name: Analysis
'on':
push:
branches:
- master
paths-ignore:
- README.md
pull_request:
paths-ignore:
- README.md
jobs:
analysis:
name: 'PHP ${{ matrix.php }} Symfony ${{ matrix.symfony }}'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php:
- 8.1
- 8.2
symfony:
- '5.4.*'
- '6.3.*'
env:
APP_ENV: test
steps:
-
uses: actions/checkout@v3
-
name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
php-version: '${{ matrix.php }}'
tools: symfony
coverage: none
-
name: 'Composer - Get Cache Directory'
id: composer-cache
run: 'echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT'
-
name: 'Composer - Set cache'
uses: actions/cache@v3
with:
path: '${{ steps.composer-cache.outputs.dir }}'
key: 'php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-${{ hashFiles(''**/composer.json'') }}'
restore-keys: "php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-composer-\n"
-
name: 'Composer - Validate composer.json and composer.lock'
run: 'composer validate --strict'
-
name: 'Composer - Github Auth'
run: 'composer config -g github-oauth.github.com ${{ github.token }}'
-
name: 'Composer - Restrict Symfony version'
run: 'composer config extra.symfony.require "${{ matrix.symfony }}"'
-
name: 'Composer - Update dependencies'
run: 'composer update --no-progress'
id: end-of-setup
-
name: 'ECS - Run'
run: 'if [ -f ruleset/ecs.php ]; then vendor/bin/ecs check src/ --no-progress-bar -c ruleset/ecs.php ; else echo Ecs ruleset file does not exist, skipping step ; fi'
if: 'always() && steps.end-of-setup.outcome == ''success'''
-
name: 'PHPStan - Run'
run: 'if [ -f ruleset/phpstan.neon ]; then vendor/bin/phpstan analyse -c ruleset/phpstan.neon src/ ; else echo PHPStan ruleset file does not exist, skipping step ; fi'
if: 'always() && steps.end-of-setup.outcome == ''success'''
-
name: 'PHPMD - Run'
run: 'if [ -f ruleset/.php_md.xml ]; then vendor/bin/phpmd src ansi ruleset/.php_md.xml ; else echo PHPMD config file does not exist, skipping step ; fi'
if: 'always() && steps.end-of-setup.outcome == ''success'''
-
name: 'GrumPHP - Run'
run: 'if [ -f grumphp.yml ]; then vendor/bin/grumphp run ; else echo Grumphp ruleset file does not exist, skipping step ; fi'
if: 'always() && steps.end-of-setup.outcome == ''success'''
-
uses: symfonycorp/security-checker-action@v3
if: 'always() && steps.end-of-setup.outcome == ''success'''
continue-on-error: true