-
-
Notifications
You must be signed in to change notification settings - Fork 63
174 lines (160 loc) · 5.84 KB
/
ci.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
---
name: CI
on:
push:
branches:
- main
- 4.x
pull_request:
schedule:
- cron: '15 3 * * 1'
jobs:
php-lint:
name: "PHP linter"
runs-on: ubuntu-20.04
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: none
tools: composer:v2
- name: "Run PHP lint"
run: "composer ci:php:lint"
strategy:
fail-fast: false
matrix:
php-version:
- 8.2
code-quality:
name: "Code quality checks"
runs-on: ubuntu-20.04
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: none
tools: composer:v2
- name: "Show Composer version"
run: composer --version
- name: "Cache dependencies installed with composer"
uses: actions/cache@v4
with:
key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
path: ~/.cache/composer
restore-keys: "php${{ matrix.php-version }}-composer-\n"
- name: "Install Composer dependencies"
run: "composer install --no-progress"
- name: "Run command"
run: "composer ci:${{ matrix.command }}"
strategy:
fail-fast: false
matrix:
command:
- "json:lint"
- "yaml:lint"
- "ts:lint"
- "php:cs-fixer"
php-version:
- 8.2
testV12:
runs-on: ubuntu-latest
strategy:
max-parallel: 2
matrix:
php-versions: [ 8.1, 8.2 ]
typo3-versions:
- { typo3: 12, testing: ^8.0, phpunit: ^10, phpcov: ^9, yaml: ^6 }
name: "Run tests with PHP ${{ matrix.php-versions }}
using TYPO3 ${{ matrix.typo3-versions.typo3 }}
with testing framework version ${{ matrix.typo3-versions.testing }}"
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: intl, mbstring, pdo_sqlite
- name: "Cache composer dependencies"
uses: actions/cache@v4
with:
path: ~/.composer/cache
key: php-${{ matrix.php-versions }}
-typo3-${{ matrix.typo3-versions.typo3 }}
-phpunit-${{ matrix.typo3-versions.phpunit }}
-phpcov-${{ matrix.typo3-versions.phpcov }}
-yaml-${{ matrix.typo3-versions.yaml }}
-testing-${{ matrix.typo3-versions.testing }}
-composer-${{ hashFiles('composer.json') }}
restore-keys: |
php-${{ matrix.php-versions }}
-typo3-${{ matrix.typo3-versions.typo3 }}
-phpunit-${{ matrix.typo3-versions.phpunit }}
-phpcov-${{ matrix.typo3-versions.phpcov }}
-yaml-${{ matrix.typo3-versions.yaml }}
-testing-${{ matrix.typo3-versions.testing }}composer-
php-${{ matrix.php-versions }}-typo3-
- name: "Install composer dependencies"
run: composer require typo3/minimal
"^${{ matrix.typo3-versions.typo3 }}"
typo3/testing-framework "${{ matrix.typo3-versions.testing }}"
phpunit/phpunit "${{ matrix.typo3-versions.phpunit }}"
phpunit/phpcov "${{ matrix.typo3-versions.phpcov }}"
symfony/yaml "${{ matrix.typo3-versions.yaml }}"
--prefer-dist --no-progress
- name: "Run Unit tests"
run: composer ci:test:unit
- name: "Functional tests"
run: composer ci:test:functional
testsV13:
runs-on: ubuntu-latest
strategy:
max-parallel: 2
matrix:
php-versions: [8.2, 8.3]
typo3-versions:
- {typo3: 13, testing: ^9.0, phpunit: ^11, phpcov: ^10, yaml: ^7 }
name: "Run tests with PHP ${{ matrix.php-versions }}
using TYPO3 ${{ matrix.typo3-versions.typo3 }}
with testing framework version ${{ matrix.typo3-versions.testing }}"
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: intl, mbstring, pdo_sqlite
- name: "Cache composer dependencies"
uses: actions/cache@v4
with:
path: ~/.composer/cache
key: php-${{ matrix.php-versions }}
-typo3-${{ matrix.typo3-versions.typo3 }}
-phpunit-${{ matrix.typo3-versions.phpunit }}
-phpcov-${{ matrix.typo3-versions.phpcov }}
-yaml-${{ matrix.typo3-versions.yaml }}
-testing-${{ matrix.typo3-versions.testing }}
-composer-${{ hashFiles('composer.json') }}
restore-keys: |
php-${{ matrix.php-versions }}
-typo3-${{ matrix.typo3-versions.typo3 }}
-phpunit-${{ matrix.typo3-versions.phpunit }}
-phpcov-${{ matrix.typo3-versions.phpcov }}
-yaml-${{ matrix.typo3-versions.yaml }}
-testing-${{ matrix.typo3-versions.testing }}composer-
php-${{ matrix.php-versions }}-typo3-
- name: "Install composer dependencies"
run: composer remove php-coveralls/php-coveralls --dev --no-progress && composer require typo3/minimal
"^${{ matrix.typo3-versions.typo3 }}"
typo3/testing-framework "${{ matrix.typo3-versions.testing }}"
phpunit/phpunit "${{ matrix.typo3-versions.phpunit }}"
phpunit/phpcov "${{ matrix.typo3-versions.phpcov }}"
symfony/yaml "${{ matrix.typo3-versions.yaml }}"
--prefer-dist --no-progress
- name: "Run Unit tests"
run: composer ci:test:unit
- name: "Functional tests"
run: composer ci:test:functional