-
Notifications
You must be signed in to change notification settings - Fork 11
144 lines (115 loc) · 5.31 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
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
# Configuration for running GitHub actions
# based on EXT:enetcache: .github/workflows/tests.yml.not-used-yet
# https://github.com/lolli42/enetcache/blob/master/.github/workflows/tests.yml
# see https://docs.github.com/en/actions/guides/setting-up-continuous-integration-using-workflow-templates
name: CI
on:
push:
pull_request:
schedule:
- cron: '42 5 * * 1'
jobs:
static:
# only run jobs via scheduled workflow in main repo, not in forks
if: (github.event_name == 'schedule' && github.repository == 'sypets/brofix') || (github.event_name != 'schedule')
name: "static"
runs-on: ubuntu-20.04
strategy:
# This prevents cancellation of matrix job runs, if one/two already failed and let the
# rest matrix jobs be be executed anyway.
fail-fast: true
matrix:
php: [ '8.3' ]
minMax: [ 'composerInstallMax' ]
steps:
- name: "Checkout"
uses: actions/checkout@v2
- name: "show php version"
run: php --version
# This must be checked before core version select is run, as this would write this
# and than the check would fail - obiously.
- name: "Check if typo3/minimal has been pushed in composer.json"
run: Build/Scripts/checkComposerJsonForPushedMinimalPackage.sh
#- name: "Set Typo3 core version"
# run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -t "^11.5" -s composerCoreVersion
- name: "Composer"
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s ${{ matrix.minMax }}
- name: "cgl"
if: ${{ matrix.php != '8.1' }}
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s cgl -v -n
- name: "Composer validate"
if: always()
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s composerValidate
all_core_latest:
# only run jobs via scheduled workflow in main repo, not in forks
if: (github.event_name == 'schedule' && github.repository == 'sypets/brofix') || (github.event_name != 'schedule')
name: "all core-latest"
runs-on: ubuntu-20.04
strategy:
# This prevents cancellation of matrix job runs, if one/two already failed and let the
# rest matrix jobs be be executed anyway.
fail-fast: true
matrix:
php: [ '8.2', '8.4' ]
minMax: [ 'composerInstallMax' ]
steps:
- name: "Checkout"
uses: actions/checkout@v2
- name: "show php version"
run: php --version
#- name: "Set Typo3 core version"
# run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -t "^11.5" -s composerCoreVersion
- name: "Composer"
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s ${{ matrix.minMax }}
- name: "Lint PHP"
if: always()
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s lint
- name: "phpstan"
if: ${{ always() && matrix.minMax == 'composerInstallMax' }}
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s phpstan -e "--error-format=github" -v
# todo: replace prophecy
#- name: "Unit tests"
# if: always()
# run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s unit -v
#- name: "Functional tests with mariadb"
# if: always()
# run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -d mariadb -s functional -v
#- name: "Functional tests with sqlite (nightly or pull_request)"
# if: ${{ always() && (github.event_name == 'schedule' || github.event_name == 'pull_request' ) }}
# run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -d sqlite -s functional
#- name: "Functional tests with postgres (nightly or pull_request)"
# if: ${{ always() && (github.event_name == 'schedule' || github.event_name == 'pull_request' ) }}
# run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -d postgres -s functional
# v12
all_core_v12:
# only run jobs via scheduled workflow in main repo, not in forks
if: (github.event_name == 'schedule' && github.repository == 'sypets/brofix') || (github.event_name != 'schedule')
name: "all core-v12"
runs-on: ubuntu-20.04
strategy:
# This prevents cancellation of matrix job runs, if one/two already failed and let the
# rest matrix jobs be be executed anyway.
fail-fast: true
matrix:
php: [ '8.1', '8.3' ]
minMax: [ 'composerInstallMax' ]
steps:
- name: "Checkout"
uses: actions/checkout@v2
- name: "show php version"
run: php --version
- name: "Set Typo3 core version"
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -t "^12.4" -s composerCoreVersion
- name: "Add prophecy for unit / functional tests"
run: composer require --dev jangregor/phpstan-prophecy phpspec/prophecy phpspec/prophecy-phpunit typo3/testing-framework:^7
- name: "Composer"
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s ${{ matrix.minMax }}
- name: "phpstan"
if: ${{ always() && matrix.minMax == 'composerInstallMax' }}
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s phpstan -e "--error-format=github" -v
- name: "Unit tests"
if: always()
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s unit -v
- name: "Functional tests with mariadb"
if: always()
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -d mariadb -s functional -v