-
Notifications
You must be signed in to change notification settings - Fork 1
101 lines (93 loc) · 3.57 KB
/
test.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
97
98
99
100
101
---
name: Test
on: [push, pull_request]
jobs:
php-lint:
name: "PHP linter"
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [8.1, 8.2, 8.3]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-versions }}"
- name: "Cache composer dependencies"
uses: actions/cache@v1
with:
path: ~/.composer/cache
key: php-${{ matrix.php-versions }}
-composer-${{ hashFiles('composer.json') }}
restore-keys: |
php-${{ matrix.php-versions }}-composer-
- name: "Install composer dependencies"
run: composer install --no-progress
- name: "Run PHP lint"
run: "composer run-script test-php-lint"
php-cs-fixer:
name: "PHP-CS-Fixer"
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [8.3]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-versions }}"
- name: "Cache composer dependencies"
uses: actions/cache@v1
with:
path: ~/.composer/cache
key: php-${{ matrix.php-versions }}
-composer-${{ hashFiles('composer.json') }}
restore-keys: |
php-${{ matrix.php-versions }}-composer-
- name: "Install composer dependencies"
run: composer install --no-progress
- name: "Run PHP-CS-Fixer"
run: "composer run-script test-php-cs-fixer"
tests:
runs-on: ubuntu-latest
strategy:
max-parallel: 2
matrix:
variants:
- {typo3: 13, php: 8.3}
- {typo3: 13, php: 8.2}
- {typo3: 12, php: 8.3}
- {typo3: 12, php: 8.2}
- {typo3: 12, php: 8.1}
name: "Run tests with PHP ${{ matrix.variants.php }}
using TYPO3 ${{ matrix.variants.typo3 }}"
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.variants.php }}
extensions: xml, mbstring, curl
- name: "Cache composer dependencies"
uses: actions/cache@v1
with:
path: ~/.composer/cache
key: php-${{ matrix.variants.php }}
-typo3-${{ matrix.variants.typo3 }}
-composer-${{ hashFiles('composer.json') }}
restore-keys: |
php-${{ matrix.variants.php }}
-typo3-${{ matrix.variants.typo3 }}
-composer-${{ hashFiles('composer.json') }}
- name: "Install composer dependencies"
run: composer require typo3/minimal
"^${{ matrix.variants.typo3 }}"
--prefer-dist --no-progress --no-suggest
- name: "Run PHPStan tests"
run: composer run-script test-phpstan
# todo: move to separate task?
- name: "Run Functional tests"
run: composer run-script test-functional