-
-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (91 loc) · 3.52 KB
/
continuous-integration.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: Continuous Integration
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
code_quality:
name: Code Quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
tools: symfony-cli
- name: Install Composer dependencies
run: symfony composer update ${{ matrix.config.COMPOSER_FLAGS }} --prefer-dist --no-interaction --no-progress
# Will install the CKFinder Connector
- name: Install Playground Composer dependencies
run: symfony composer install --prefer-dist --no-interaction --no-progress
working-directory: playground/symfony-6.2
- name: Run Rector
run: symfony php vendor/bin/rector --dry-run
- name: Run Easy Coding Standard
run: symfony php vendor/bin/ecs
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
# Minimum supported dependencies with the latest and oldest PHP version
- PHP_VERSION: '8.1'
COMPOSER_FLAGS: --prefer-stable --prefer-lowest
PLAYGROUND_VERSION: '6.0'
# Test the latest stable release
- PHP_VERSION: '8.1'
PLAYGROUND_VERSION: '6.0'
- PHP_VERSION: '8.2'
PLAYGROUND_VERSION: '6.0'
- PHP_VERSION: '8.1'
PLAYGROUND_VERSION: '6.1'
- PHP_VERSION: '8.2'
PLAYGROUND_VERSION: '6.1'
- PHP_VERSION: '8.1'
PLAYGROUND_VERSION: '6.2'
- PHP_VERSION: '8.2'
PLAYGROUND_VERSION: '6.2'
# Test specific Symfony versions
- PHP_VERSION: '8.1'
SYMFONY_VERSION: '6.*' # Last 6.x version
PLAYGROUND_VERSION: '6.0'
STABILITY: dev
- PHP_VERSION: '8.2'
SYMFONY_VERSION: '6.*' # Last 6.x version
PLAYGROUND_VERSION: '6.2'
STABILITY: dev
steps:
- uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.config.PHP_VERSION }}
tools: symfony-cli
- name: Install globally Symfony Flex
run: |
symfony composer global require --no-progress --no-scripts --no-plugins symfony/flex
symfony composer global config --no-plugins allow-plugins.symfony/flex true
- name: Configure Composer minimum stability
if: matrix.config.STABILITY
run: symfony composer config minimum-stability ${{ matrix.config.STABILITY }}
- name: Limit to specific Symfony version
if: matrix.config.SYMFONY_VERSION
run: echo "SYMFONY_REQUIRE=${{ matrix.config.SYMFONY_VERSION }}" >> $GITHUB_ENV
- name: Install Composer dependencies
run: symfony composer update ${{ matrix.config.COMPOSER_FLAGS }} --prefer-dist --no-interaction --no-progress
# Will install the CKFinder Connector
- name: Install Playground Composer dependencies
run: symfony composer install --prefer-dist --no-interaction --no-progress
working-directory: playground/symfony-${{ matrix.config.PLAYGROUND_VERSION }}
- name: Run PHPStan
run: symfony php vendor/bin/phpstan analyze
- name: Run PHPUnit
run: symfony php vendor/bin/phpunit