-
-
Notifications
You must be signed in to change notification settings - Fork 18
90 lines (72 loc) · 3.36 KB
/
Test.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
name: Test
on:
push:
branches:
- main
- /^v?([0-9]+\.){1,2}(x|[0-9]+)-?[a-z]*[1-9]*$/
pull_request:
branches:
- main
jobs:
Tests:
name: 'T3 ${{ matrix.typo3 }} - PHP ${{ matrix.php }} - ${{ matrix.dependency-version }}'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
typo3: [ '^11.5.0', '^12.4.0' ]
php: [ '8.1', '8.2', '8.3' ]
dependency-version: [ lowest, stable ]
experimental: [ false ]
continue-on-error: ${{ matrix.experimental }}
steps:
- name: Start database server
run: sudo /etc/init.d/mysql start
- name: Checkout
uses: actions/checkout@v4
- name: Composer Cache Vars
id: composer-cache-vars
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
echo "timestamp=$(date +"%s")" >> $GITHUB_OUTPUT
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache-vars.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.typo3 }}-${{ matrix.dependency-version }}-${{ matrix.php }}-${{ steps.composer-cache-vars.outputs.timestamp }}
restore-keys: |
${{ runner.os }}-composer-${{ matrix.typo3 }}-${{ matrix.dependency-version }}-${{ matrix.php }}-
${{ runner.os }}-composer-${{ matrix.typo3 }}-${{ matrix.dependency-version }}-
${{ runner.os }}-composer-${{ matrix.typo3 }}-
${{ runner.os }}-composer-
- name: Set up PHP Version ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none
- name: Environment Check
run: |
php --version
composer --version
- name: Validate composer.json and composer.lock
run: composer validate
- name: Install
run: |
composer update --with typo3/cms-core="${{ matrix.typo3 }}" --prefer-${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Lint
run: vendor/bin/parallel-lint --exclude vendor --exclude .Build .
- name: Unit Tests
run: vendor/bin/phpunit tests/Unit/
- name: Install Test
run: |
rm -f public/typo3conf/LocalConfiguration.php config/system/settings.php
TYPO3_CONTEXT=Development vendor/bin/typo3 install:setup --no-interaction --skip-integrity-check --install-steps-config tests/Functional/Fixtures/install.steps.yaml
- name: Site Test
run: |
rm -rf var/cache/*
vendor/bin/typo3 site:list | grep my-fancy-host
- name: BE Config Test
run: |
rm -rf var/cache/*
vendor/bin/typo3 configuration:showlocal SYS/sitename --json | grep 'TYPO3 Config Handling Distribution'