-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (89 loc) · 2.91 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
name: build
on:
push:
branches: [ master, develop, '[0-9]+.[0-9]+', '[0-9]+.[0-9]+.[0-9]+' ]
pull_request:
branches: [ master, develop, '[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 }}"
strategy:
fail-fast: false
matrix:
php: ["7.4", "8.1", "8.2"]
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: 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 }}"
strategy:
fail-fast: false
matrix:
php: ["7.4", "8.1", "8.2"]
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: 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: [phpcs, phpstan]
strategy:
fail-fast: false
matrix:
php: ["7.4", "8.1", "8.2"]
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: 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