-
Notifications
You must be signed in to change notification settings - Fork 19
91 lines (91 loc) · 3.47 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
80
81
82
83
84
85
86
87
88
89
90
91
name: Analysis
'on':
push:
branches:
- develop
- qa
- 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:
matrix:
php:
- 8.2
symfony:
- '6.2.*'
env:
APP_ENV: test
steps:
-
uses: actions/checkout@v2
-
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 "::set-output name=dir::$(composer config cache-files-dir)"'
-
name: 'Composer - Set cache'
uses: actions/cache@v2
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: 'PHPStan - Run'
run: 'if [ -f rulesets/phpstan.neon ]; then vendor/bin/phpstan analyse -c rulesets/phpstan.neon src/ ; else echo PHPStan rulesets file does not exist, skipping step ; fi'
if: 'always() && steps.end-of-setup.outcome == ''success'''
-
name: 'PHPSpec - Run'
run: 'if [ -f phpspec.yml.dist ]; then vendor/bin/phpspec run ; else echo PHPSpec config file does not exist, skipping step ; fi'
if: 'always() && steps.end-of-setup.outcome == ''success'''
-
name: 'Checks security issues - Run'
run: 'symfony security:check'
if: 'always() && steps.end-of-setup.outcome == ''success'''
sonarcloud:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: .
args: >
-Dsonar.organization=${{ secrets.SONAR_ORGA }}
-Dsonar.projectKey=github-payplug-payplug-syliuspayplugplugin
-Dsonar.sources=src/
-Dsonar.test.exclusions=tests/**
-Dsonar.tests=tests/
-Dsonar.verbose=true