This repository has been archived by the owner on Dec 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
167 lines (167 loc) · 5.35 KB
/
ci.yml
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
---
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '15 3 * * 1'
jobs:
php-lint:
name: "PHP linter"
runs-on: ubuntu-22.04
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
tools: composer:v2
coverage: none
- name: "Show Composer version"
run: composer --version
- name: "Show the Composer configuration"
run: composer config --global --list
- name: "Run PHP lint"
run: "composer ci:php:lint"
strategy:
fail-fast: false
matrix:
php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
code-quality:
name: "Code quality checks"
runs-on: ubuntu-22.04
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
tools: composer:v2
coverage: none
- name: "Show Composer version"
run: composer --version
- name: "Show the Composer configuration"
run: composer config --global --list
- name: "Cache dependencies installed with composer"
uses: actions/cache@v3
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:
- "php:sniff"
- "php:fixer"
- "php:stan"
php-version:
- "8.1"
unit-tests:
name: "Unit tests"
runs-on: ubuntu-22.04
needs: php-lint
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: laravel_tags
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
env:
DATABASE_HOST: 127.0.0.1
DATABASE_USER: root
DATABASE_PASSWORD: root
DATABASE_NAME: typo3
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
tools: composer:v2
extensions: mysqli
coverage: none
- name: "Show Composer version"
run: composer --version
- name: "Show the Composer configuration"
run: composer config --global --list
- name: "Cache dependencies installed with composer"
uses: actions/cache@v3
with:
key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
path: ~/.cache/composer
restore-keys: "php${{ matrix.php-version }}-composer-\n"
- name: "Install TYPO3 Core"
env:
TYPO3: "${{ matrix.typo3-version }}"
run: |
composer require --no-progress typo3/cms-core:"$TYPO3"
composer show
- name: "Set up TYPO3 for < 12"
if : ${{ matrix.typo3-version != '^12.4' }}
run: >
.Build/vendor/bin/typo3cms install:setup --no-interaction --site-setup-type="site"
--database-user-name="${DATABASE_USER}" --database-host-name="${DATABASE_HOST}"
--database-port="${{ job.services.mysql.ports[3306] }}" --database-name="${DATABASE_NAME}"
--admin-user-name="admin" --admin-password="334LKkq2()345d" --site-name="Test installation";
- name: "Set up TYPO3 for >= 12"
if : ${{ matrix.typo3-version == '^12.4' }}
run: >
.Build/vendor/bin/typo3 setup --no-interaction --create-site="https://example.com" --server-type="other"
--username="${DATABASE_USER}" --host="${DATABASE_HOST}"
--port="${{ job.services.mysql.ports[3306] }}" --dbname="${DATABASE_NAME}"
--admin-email="[email protected]" --driver="sqlite" --password=""
--admin-username="admin" --admin-user-password="334LKkq2()345d" --project-name="";
- name: "Run unit tests"
run: "composer ci:tests:unit"
strategy:
fail-fast: false
matrix:
include:
- typo3-version: "^9.5"
php-version: "7.2"
- typo3-version: "^9.5"
php-version: "7.3"
- typo3-version: "^9.5"
php-version: "7.4"
- typo3-version: "^10.4"
php-version: "7.2"
- typo3-version: "^10.4"
php-version: "7.3"
- typo3-version: "^10.4"
php-version: "7.4"
- typo3-version: "^11.5"
php-version: "7.4"
- typo3-version: "^11.5"
php-version: "8.0"
- typo3-version: "^11.5"
php-version: "8.1"
- typo3-version: "^11.5"
php-version: "8.2"
- typo3-version: "^12.4"
php-version: "8.1"
- typo3-version: "^12.4"
php-version: "8.2"
- typo3-version: "^12.4"
php-version: "8.3"