forked from neos/flow-development-collection
-
Notifications
You must be signed in to change notification settings - Fork 0
207 lines (181 loc) · 7.46 KB
/
experimental.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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
name: Experimental PHP test
on:
workflow_dispatch: # allow manual runs
schedule:
- cron: '0 0 * * *' # Runs every day at midnight
jobs:
build:
name: "Experimental PHP ${{ matrix.php-versions }} Test ${{ matrix.static-analysis != 'no' && matrix.static-analysis || '' }} (deps: ${{ matrix.dependencies }})"
continue-on-error: true
strategy:
fail-fast: false
matrix:
flow-versions: ['master']
php-versions: ['nightly']
dependencies: ['highest']
composer-arguments: ['--ignore-platform-reqs'] # to run --ignore-platform-reqs in experimental builds
static-analysis: ['no']
experimental: [true]
include:
- flow-versions: 'master'
php-versions: 'nightly'
composer-arguments: '--ignore-platform-reqs'
static-analysis: 'psalm'
experimental: true
dependencies: 'highest'
# Build for minimum dependencies.
- flow-versions: 'master'
php-versions: 'nightly'
composer-arguments: '--ignore-platform-reqs'
static-analysis: 'no'
experimental: true
dependencies: 'lowest'
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:10.2
env:
MYSQL_USER: neos
MYSQL_PASSWORD: neos
MYSQL_DATABASE: flow_functional_testing
MYSQL_ROOT_PASSWORD: neos
ports:
- "3306:3306"
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
postgres:
image: postgres:9.5-alpine
env:
POSTGRES_USER: neos
POSTGRES_PASSWORD: neos
POSTGRES_DB: flow_functional_testing
ports:
- "5432:5432"
options: --health-cmd=pg_isready --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis:alpine
ports:
- "6379:6379"
options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
memcached:
image: memcached:alpine
ports:
- "11211:11211"
# options: --health-cmd "timeout 5 bash -c 'cat < /dev/null > /dev/udp/127.0.0.1/11211'" --health-interval 10s --health-timeout 5s --health-retries 5
env:
FLOW_CONTEXT: Testing
FLOW_DIST_FOLDER: flow-development-distribution
FLOW_FOLDER: flow-development-collection
defaults:
run:
working-directory: ${{ env.FLOW_DIST_FOLDER }}
steps:
- name: Set Flow target branch name
run: echo "FLOW_TARGET_VERSION=${{ matrix.flow-versions }}" >> $GITHUB_ENV
working-directory: .
- name: Checkout
uses: actions/checkout@v2
with:
path: ${{ env.FLOW_FOLDER }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, xml, json, zlib, iconv, intl, pdo_sqlite, mysql, pgsql, redis, memcached, memcache, apcu
coverage: xdebug #optional
ini-values: date.timezone="Africa/Tunis", opcache.fast_shutdown=0, apc.enable_cli=on
- name: Checkout development distribution
uses: actions/checkout@v2
with:
repository: neos/flow-development-distribution
ref: ${{ env.FLOW_TARGET_VERSION }}
path: ${{ env.FLOW_DIST_FOLDER }}
- name: Set alias branch name
run: if [ "${FLOW_TARGET_VERSION}" == "master" ]; then echo "FLOW_BRANCH_ALIAS=dev-master"; else echo "FLOW_BRANCH_ALIAS=${FLOW_TARGET_VERSION}.x-dev"; fi >> $GITHUB_ENV
- name: Update composer.json
run: |
git -C ../${{ env.FLOW_FOLDER }} checkout -b build
composer config repositories.flow '{ "type": "path", "url": "../${{ env.FLOW_FOLDER }}", "options": { "symlink": false } }'
composer require --no-update neos/flow-development-collection:"dev-build as ${{ env.FLOW_BRANCH_ALIAS }}"
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: |
~/.cache/composer
${{ env.FLOW_DIST_FOLDER }}/Packages
key: php-${{ matrix.php-versions }}-${{ matrix.dependencies }}${{ hashFiles('**/composer.json') }}
restore-keys: php-${{ matrix.php-versions }}-${{ matrix.dependencies }}
- name: Install dependencies
run: |
composer ${{ matrix.dependencies == 'locked' && 'install' || 'update' }} --no-progress --no-interaction ${{ matrix.dependencies == 'lowest' && '--prefer-lowest' || '' }} ${{ matrix.composer-arguments }}
- name: Set Flow Context
run: echo "FLOW_CONTEXT=${{ env.FLOW_CONTEXT }}" >> $GITHUB_ENV
- name: Setup Flow configuration
run: |
rm -f Configuration/Routes.yaml
rm -f Configuration/Testing/Settings.yaml
cat <<EOF >> Configuration/Testing/Settings.yaml
Neos:
Flow:
persistence:
backendOptions:
host: '127.0.0.1'
driver: pdo_mysql
user: 'neos'
password: 'neos'
dbname: 'flow_functional_testing'
mvc:
routes:
'Neos.Flow': TRUE
EOF
echo "Running in context '$FLOW_CONTEXT'"
./flow configuration:show
./flow routing:list
- name: Static analysis
if: matrix.static-analysis == 'psalm'
run: composer test-static
- name: Run unit tests
if: matrix.static-analysis == 'no'
run: composer test-unit -- --verbose
- name: Run functional tests
if: matrix.static-analysis == 'no'
run: composer test-func -- --verbose
- name: Run behat tests
if: ${{ matrix.static-analysis == 'no' && matrix.dependencies != 'lowest' }}
#if: env.BEHAT == true
run: |
FLOW_CONTEXT=Testing/Behat ./flow behat:setup && ./flow doctrine:create && ./flow doctrine:migrationversion --add --version all
bin/behat --stop-on-failure -f progress -c Packages/Framework/Neos.Flow/Tests/Behavior/behat.yml.dist
- name: Setup Flow configuration (PGSQL)
run: |
rm -f Configuration/Testing/Settings.yaml
cat <<EOF >> Configuration/Testing/Settings.yaml
Neos:
Flow:
persistence:
backendOptions:
host: '127.0.0.1'
port: 5432
driver: pdo_pgsql
user: 'neos'
password: 'neos'
dbname: 'flow_functional_testing'
charset: 'utf8'
defaultTableOptions:
charset: 'utf8'
mvc:
routes:
'Neos.Flow': TRUE
EOF
- name: Run unit tests (PGSQL)
if: matrix.static-analysis == 'no'
run: composer test-unit -- --verbose
- name: Run functional tests (PGSQL)
if: matrix.static-analysis == 'no'
run: composer test-func -- --verbose
- name: Run behat tests (PGSQL)
if: ${{ matrix.static-analysis == 'no' && matrix.dependencies != 'lowest' }}
#if: env.BEHAT == true
run: |
FLOW_CONTEXT=Testing/Behat ./flow behat:setup && ./flow doctrine:create && ./flow doctrine:migrationversion --add --version all
bin/behat --stop-on-failure -f progress -c Packages/Framework/Neos.Flow/Tests/Behavior/behat.yml.dist