-
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (54 loc) · 1.89 KB
/
php.yml
File metadata and controls
63 lines (54 loc) · 1.89 KB
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
name: IDMarinas Common Bundle Test Suite
on:
pull_request:
branches: [ 3.x ]
types: [ opened, synchronize, reopened ]
tags-ignore: [ dependencies, documentation, meta, 'docker configuration', 'deployer configuration' ]
push:
branches: [ 3.x ]
paths-ignore:
- '.idea/**'
- 'migrations/**'
- '**/docs/**'
- '**/Writerside/**'
- '**/*.md'
- '**/LICENSE'
- rector.php
- .editorconfig
- .gitignore
- compose.yaml
jobs:
build:
runs-on: ubuntu-latest
name: PHP ${{ matrix.php }} and Symfony ${{ matrix.symfony }}
strategy:
matrix:
php: [ '8.3', '8.4', '8.5' ]
symfony: [ '6.4.*', '7.1.*', '7.2.*', '7.3.*', '7.4.*', '8.0.*' ]
exclude:
- php: '8.3'
symfony: '8.0.*'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: ${{ (matrix.php == '8.3' && matrix.symfony == '6.4.*') && '0' || '1' }}
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: flex
- name: Download dependencies
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}
COMPOSER_NO_SECURITY_BLOCKING: 1
uses: ramsey/composer-install@v3
- name: Create Database SQLite
run: 'php bin/console doctrine:schema:create --env=test && php bin/console doctrine:fixtures:load --env=test -n'
- name: Run test suite on PHP ${{ matrix.php }} and Symfony ${{ matrix.symfony }}
run: ./vendor/bin/phpunit --exclude-group ignore --exclude-group legacy
- name: SonarCloud Scan
if: matrix.php == '8.3' && matrix.symfony == '6.4.*'
uses: SonarSource/sonarqube-scan-action@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}