-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (69 loc) · 2.54 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
name: CI tests (on pull requests and manually)
on:
pull_request:
branches:
- master
- develop
workflow_dispatch:
jobs:
unitAndFunctionalTests:
name: Unit and functional tests
# needed because of missing auth_plugin_caching_sha2_password in PHP 7.3
# Ubuntu 20.04 contains Mysql 8.0 that requires this as default_authentication_plugin
# another option would be to put [mysqld] default_authentication_plugin=mysql_native_password into ~./.mysql.cnf
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
env:
- { php: 7.3, TYPO3_VERSION: ^9.5 }
- { php: 7.4, TYPO3_VERSION: ^9.5 }
- { php: 7.3, TYPO3_VERSION: ^10.4 }
- { php: 7.4, TYPO3_VERSION: ^10.4, coverage: true}
- { php: 7.4, TYPO3_VERSION: ^11.5 }
- { php: 8.0, TYPO3_VERSION: ^11.5 }
- { php: 8.1, TYPO3_VERSION: ^11.5 }
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up PHP version ${{ matrix.env.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.env.php }}
tools: composer:v2, php-cs-fixer
- name: Start database server
run: sudo /etc/init.d/mysql start
- name: Environment Check
run: |
php --version
composer --version
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install dependencies with typo3/cms-core:${{ matrix.env.TYPO3_VERSION }}
run: |
composer require typo3/cms-core:${{ matrix.env.TYPO3_VERSION }} --no-progress
git checkout composer.json
- name: Info
run: composer info
- name: PHP-CS-Fixer TYPOIII
run: .Build/bin/php-cs-fixer fix
- name: PHPStan Classes
run: composer thucke:phpstan:classes
- name: Lint PHP
run: composer thucke:test:php:lint
- name: Unit Tests with coverage
if: ${{ matrix.env.coverage == true }}
run: composer thucke:test:php:unit:cover
- name: Unit Tests without coverage
run: composer thucke:test:php:unit
- name: Unit Tests with coverage
if: ${{ matrix.env.coverage == true }}
run: composer thucke:test:php:unit
- name: Functional Tests without coverage
run: composer thucke:test:php:functional
env:
typo3DatabaseHost: 127.0.0.1
typo3DatabaseName: t3func
typo3DatabasePassword: root
typo3DatabaseUsername: root
TYPO3_CONEXT: Development