-
-
Notifications
You must be signed in to change notification settings - Fork 20
54 lines (43 loc) · 1.52 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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
typo3: ['11.5']
php: ['7.4', '8.0', '8.1']
steps:
- uses: actions/checkout@v1
- name: Set up PHP Version
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
extensions: mysql
- name: Start MySQL
run: sudo /etc/init.d/mysql start
- name: Validate composer.json and composer.lock
run: composer validate
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.composer/cache
key: dependencies-composer-${{ hashFiles('composer.json') }}
- name: Install composer dependencies
run: |
composer require typo3/cms-core:${{ matrix.typo3 }} --no-progress
git checkout composer.json
export TYPO3_PATH_WEB=$PWD/.Build/Web
- name: Unit tests
run: |
echo "Running unit tests";
.Build/bin/phpunit --colors -c Tests/Build/UnitTests.xml
- name: Functional tests
run: |
export typo3DatabaseName="typo3";
export typo3DatabaseHost="127.0.0.1";
export typo3DatabaseUsername="root";
export typo3DatabasePassword="root";
echo "Running functional tests";
find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo; echo "Running functional test suite {}"; .Build/bin/phpunit -c Tests/Build/FunctionalTests.xml {}'