-
Notifications
You must be signed in to change notification settings - Fork 5
95 lines (91 loc) · 2.86 KB
/
ci.yaml
File metadata and controls
95 lines (91 loc) · 2.86 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
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
92
93
94
95
name: CI
on:
pull_request: null
push:
branches:
- 1.x
schedule:
- cron: "45 7 * * 1"
jobs:
Tests:
name: PHP ${{ matrix.php }} Symfony ${{ matrix.symfony-version }}${{ matrix.description }}
runs-on: ubuntu-latest
env:
SYMFONY_DEPRECATIONS_HELPER: 'max[self]=0'
strategy:
matrix:
php:
- '8.4'
- '8.3'
- '8.2'
symfony-version: ['']
include:
- php: '8.5'
composer_options: '--ignore-platform-req=php+'
- symfony-version: '^8.0'
php: '8.4'
- symfony-version: '^7.3'
php: '8.3'
- symfony-version: '^6.4'
php: '8.2'
- php: '8.2'
dependencies: 'prefer-lowest'
env:
SYMFONY_DEPRECATIONS_HELPER: 'disabled'
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 2 # needed by codecov sometimes
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
tools: flex
- name: Configure Composer minimum-stability
if: matrix.composer-minimum-stability
run: composer config minimum-stability ${{ matrix.composer-minimum-stability }}
- name: Remove Composer unneeded dependencies
run: composer remove --dev --no-update vimeo/psalm psalm/plugin-phpunit facile-it/facile-coding-standard
- name: Install dependencies
uses: "ramsey/composer-install@v4"
with:
composer-options: ${{ matrix.composer_options }}
dependency-versions: "${{ matrix.dependencies }}"
env:
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
- name: Run tests
run: vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Upload code coverage
uses: codecov/codecov-action@v6
with:
files: './coverage.xml'
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
SA:
strategy:
matrix:
include:
- description: Composer checks
script: vendor/bin/composer-dependency-analyser && composer validate
- description: Code style
script: vendor/bin/php-cs-fixer fix --ansi --verbose --dry-run
- description: Rector
script: vendor/bin/rector --ansi --dry-run
- description: PHPStan
script: vendor/bin/phpstan analyze
- description: Psalm
script: vendor/bin/psalm
name: ${{ matrix.description }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
- name: Install dependencies
uses: "ramsey/composer-install@v4"
- run: ${{ matrix.script }}