-
Notifications
You must be signed in to change notification settings - Fork 40
132 lines (116 loc) · 4.12 KB
/
tests.yml
File metadata and controls
132 lines (116 loc) · 4.12 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
name: tests
on:
push:
branches:
- master
- 'feature/**'
- 'fix/**'
pull_request:
jobs:
tests:
name: PHP ${{ matrix.php }} / TYPO3 ${{ matrix.typo3 }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.2', '8.3', '8.4']
typo3: ['^12.4', '^13.4', '^14.3']
exclude:
- { php: '8.4', typo3: '^12.4' }
steps:
- uses: actions/checkout@v6
# libheif1 + plugins give ImageMagick and libvips a real AV1 encoder so
# AVIF write paths exercise instead of skipping. libheif-plugin-aomenc is
# the AV1 encoder; libjxl-tools gets libvips's jxlsave operation.
- name: Install image binaries (ImageMagick + GraphicsMagick + libheif + libjxl)
if: ${{ !env.ACT }}
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: imagemagick graphicsmagick libheif1 libheif-plugin-aomenc libheif-plugin-x265 libjxl-tools
version: 3.0
- name: Install image binaries locally (act)
if: ${{ env.ACT }}
run: sudo apt-get update && sudo apt-get install -y imagemagick graphicsmagick libheif1 libheif-plugin-aomenc libheif-plugin-x265 libjxl-tools
- name: Set up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: gd, intl, mbstring, pdo_sqlite, json, xml, zip, ffi
ini-values: ffi.enable=true, zend.max_allowed_stack_size=-1
tools: composer:v2
coverage: none
- name: Install libvips
if: ${{ !env.ACT }}
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: libvips-tools
version: 1.0
- name: Install libvips locally (act)
if: ${{ env.ACT }}
run: sudo apt-get update && sudo apt-get install -y libvips-tools
- name: Cache Composer downloads
if: ${{ !env.ACT }}
uses: actions/cache@v5
with:
path: ~/.composer/cache
key: composer-${{ matrix.php }}-${{ matrix.typo3 }}-${{ hashFiles('composer.json') }}
restore-keys: |
composer-${{ matrix.php }}-${{ matrix.typo3 }}-
composer-${{ matrix.php }}-
- name: Pin TYPO3 version
run: composer require --no-update typo3/cms-core:"${{ matrix.typo3 }}"
- name: Install dependencies
env:
TYPO3_SKIP_ASSET_PUBLISH: '1'
run: composer update --no-interaction --no-progress --prefer-dist
- name: Install jcupitt/vips (for VipsConverter functional tests)
env:
TYPO3_SKIP_ASSET_PUBLISH: '1'
run: composer require --dev --no-interaction --no-progress jcupitt/vips:^2.6
- name: Unit tests
run: .Build/bin/phpunit -c phpunit.xml
- name: Functional tests
env:
typo3DatabaseDriver: pdo_sqlite
run: .Build/bin/phpunit -c phpunit-functional.xml
composer-validate:
name: composer validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
tools: composer:v2
coverage: none
- run: composer validate --no-check-publish
cs-fixer:
name: php-cs-fixer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: mbstring, json
tools: composer:v2
coverage: none
- env:
TYPO3_SKIP_ASSET_PUBLISH: '1'
run: composer install --no-interaction --no-progress --prefer-dist
- run: .Build/bin/php-cs-fixer fix --config=php-cs-fixer.config.php --dry-run --diff
phpstan:
name: phpstan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: mbstring, json
tools: composer:v2
coverage: none
- env:
TYPO3_SKIP_ASSET_PUBLISH: '1'
run: composer install --no-interaction --no-progress --prefer-dist
- run: .Build/bin/phpstan analyse --no-progress