-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (52 loc) · 1.71 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
# Adapted from https://github.com/TYPO3GmbH/blog/blob/master/.github/workflows/ci.yml
name: CI
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
typo3: [^9.5, ^10.4]
php: ['7.2', '7.3', '7.4']
services:
mysql:
image: mysql:5.6
env:
MYSQL_ALLOW_EMPTY_PASSWORD: false
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: test
ports:
- 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP ${{ matrix.php }}, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, dom, zip
- name: Start mysql service
run: sudo /etc/init.d/mysql start
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies with typo3/cms-core:${{ matrix.typo3 }}
run: |
composer require typo3/cms-core:${{ matrix.typo3 }} --no-progress
git checkout composer.json
- name: php-cs-fixer
run: composer ci:php:fixer
- name: Lint PHP
run: composer ci:php:lint
- name: Unit Tests
run: composer ci:tests:unit
- name: Functional Tests
env:
typo3DatabaseName: test
typo3DatabaseUsername: root
typo3DatabasePassword: password
typo3DatabaseHost: 127.0.0.1
typo3DatabasePort: ${{ job.services.mysql.ports['3306'] }}
run: |
composer ci:tests:functional