-
-
Notifications
You must be signed in to change notification settings - Fork 15
96 lines (84 loc) · 3.15 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
name: Continous Integration
on:
push:
branches:
- master
- 'v[0-9]+\.x'
pull_request:
jobs:
integration:
name: Integration tests
runs-on: ubuntu-22.04
strategy:
matrix:
php-version: [8.1, 8.2]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP Environment
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: php-cs-fixer:3
- name: Check PHP CS
run: php-cs-fixer fix --config php-cs-fixer.php --dry-run --using-cache no --show-progress dots -vvv
phpunit:
needs: integration
name: PHP ${{ matrix.php-version }} - T3 ${{ matrix.typo3-version }}
runs-on: ubuntu-22.04
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
include:
- php-version: 8.1
typo3-version: ^12.4
experimental: false
- php-version: 8.2
typo3-version: ^12.4
experimental: false
env:
PHP_VERSION: ${{ matrix.php-version }}
TYPO3_VERSION: ${{ matrix.typo3-version }}
steps:
- name: Output Environment Data
run: |
echo "Running tests with TYPO3 ${TYPO3_VERSION} and PHP ${PHP_VERSION}"
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 10
- uses: shogo82148/actions-setup-mysql@v1
with:
mysql-version: '8.0'
root-password: $3cret
- name: Setup PHP Environment
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: fileinfo, gd, zip, zlib, openssl, intl, PDO, json, pcre, session, xml, filter, hash, mbstring, SPL, standard, mysqli
ini-values: max_execution_time=240,memory_limit=256M
tools: composer:v2
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install Dependencies
env:
PHP_VERSION: ${{ matrix.php-version }}
TYPO3_VERSION: ${{ matrix.typo3-version }}
run: |
if [[ "${{ matrix.typo3-version }}" == *"dev"* ]]; then
composer config minimum-stability dev
fi
composer req typo3/testing-framework typo3/cms-core:"${{ matrix.typo3-version }}" typo3/cms-backend:"${{ matrix.typo3-version }}" typo3/cms-extbase:"${{ matrix.typo3-version }}" typo3/cms-extensionmanager:"${{ matrix.typo3-version }}" typo3/cms-fluid:"${{ matrix.typo3-version }}" typo3/cms-frontend:"${{ matrix.typo3-version }}"
export TYPO3_PATH_WEB=$PWD/.Build/web
- name: Run PHPUnit
run: |
.Build/bin/phpunit --configuration Tests/Build/FunctionalTests.xml --coverage-clover=coverage.xml
.Build/bin/phpunit --configuration Tests/Build/UnitTests.xml