-
Notifications
You must be signed in to change notification settings - Fork 231
145 lines (118 loc) · 3.77 KB
/
build.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
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
133
134
135
136
137
138
139
140
141
142
143
144
145
name: build
on:
push:
branches: [ master, development, '[0-9]+.[0-9]+', '[0-9]+.[0-9]+.[0-9]+' ]
pull_request:
branches: [ master, development, '[0-9]+.[0-9]', '[0-9]+.[0-9]+.[0-9]+' ]
jobs:
phpcs:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
name: "CodeSniffer, PHP ${{ matrix.php }} TYPO3 ${{ matrix.typo3 }}"
strategy:
fail-fast: false
matrix:
include:
- php: "8.1"
typo3: "^11.5"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, json
ini-values: date.timezone="Europe/Copenhagen", opcache.fast_shutdown=0
tools: composer:v2.2
- name: Select TYPO3 version
run: "composer require typo3/cms-core:${{ matrix.typo3 }} -W --no-update"
- name: Composer install
uses: ramsey/composer-install@v2
- name: Run phpcs
run: vendor/bin/phpcs Classes --standard=PSR2
phpstan:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
name: "PHPStan, PHP ${{ matrix.php }} TYPO3 ${{ matrix.typo3 }}"
needs: phpcs
strategy:
fail-fast: false
matrix:
include:
- php: "7.4"
typo3: "^10.4"
- php: "8.0"
typo3: "^11.5"
- php: "8.1"
typo3: "^11.5"
- php: "8.1"
typo3: "^12.1"
- php: "8.2"
typo3: "^12.1"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, json
ini-values: date.timezone="Europe/Copenhagen", opcache.fast_shutdown=0
tools: composer:v2.2
- name: Select TYPO3 version
run: "composer require typo3/cms-core:${{ matrix.typo3 }} -W --no-update"
- name: Composer install
uses: ramsey/composer-install@v2
- name: Run phpstan
run: vendor/bin/phpstan analyze
build:
if: "!contains(github.event.head_commit.message, '[skip ci]')"
name: "PHPUnit, PHP ${{ matrix.php }} TYPO3 ${{ matrix.typo3 }}"
needs: phpstan
strategy:
fail-fast: false
matrix:
include:
- php: "7.4"
typo3: "^10.4"
- php: "8.0"
typo3: "^11.5"
- php: "8.1"
typo3: "^11.5"
- php: "8.1"
typo3: "^12.1"
- php: "8.2"
typo3: "^12.1"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, json
ini-values: date.timezone="Europe/Copenhagen", opcache.fast_shutdown=0
tools: composer:v2.2
- name: Select TYPO3 version
run: "composer require typo3/cms-core:${{ matrix.typo3 }} --no-update"
- name: Composer install
uses: ramsey/composer-install@v2
- name: Run tests
run: vendor/bin/phpunit --coverage-clover=build/logs/clover.xml
- name: Upload test coverage
run: vendor/bin/php-coveralls -vvv
env:
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: typo3-${{ matrix.typo3 }}-php-${{ matrix.php }}
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true