-
Notifications
You must be signed in to change notification settings - Fork 5
84 lines (81 loc) · 2.67 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
name: CI
on:
push:
paths:
- '**.php'
- '.github/workflows/**'
branches-ignore:
- 'l10n**'
pull_request:
branches-ignore:
- 'l10n**'
jobs:
build-php:
name: Build PHP
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 5
matrix:
typo3: [ '^12', '^13' ]
php: [ '8.1', '8.2', '8.3' ]
exclude:
- typo3: '^13'
php: '8.1'
steps:
- id: checkout
name: Checkout Code
uses: actions/checkout@v4
- id: setup_mysql
name: Set up MySQL 8.0
uses: mirromutth/mysql-action@v1.1
with:
mysql version: 8.0
mysql root password: 'root'
- id: setup_php
name: Set up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
- 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.php }}-${{ matrix.typo3 }}-${{ steps.composer-cache-vars.outputs.timestamp }}
restore-keys: |
${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.typo3 }}-
${{ runner.os }}-composer-${{ matrix.php }}-
${{ runner.os }}-composer-
- id: install
name: Install
run: |
composer remove --dev --no-update buepro/typo3-container-elements buepro/typo3-user-pizpalue friendsoftypo3/tt-address georgringer/eventnews georgringer/news
composer require typo3/cms-core:${{ matrix.typo3 }} --no-progress
git checkout composer.json
[ -d .build/public/typo3/sysext/dummy ] || mkdir -p .build/public/typo3/sysext/dummy
- id: cgl
name: CGL
if: ${{ always() && steps.install.conclusion == 'success' }}
run: |
composer ci:php:cs
- id: lint
name: Lint
if: ${{ always() && steps.install.conclusion == 'success' }}
run: |
composer ci:php:lint
- id: phpstan
name: PHPStan
if: ${{ always() && steps.install.conclusion == 'success' && matrix.typo3 == '^12' }}
run: |
composer ci:php:stan -- --error-format=github
- id: tests_unit
name: Unit Tests
if: ${{ always() && steps.install.conclusion == 'success' && matrix.typo3 == '^12' }}
run: |
composer ci:tests:unit