-
-
Notifications
You must be signed in to change notification settings - Fork 151
143 lines (124 loc) · 4.45 KB
/
Copy pathserver.yml
File metadata and controls
143 lines (124 loc) · 4.45 KB
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
name: Server (PHP)
on:
workflow_dispatch:
push:
branches: [ main, '[0-9]+.[0-9]' ]
pull_request:
branches: [ main, '[0-9]+.[0-9]' ]
jobs:
build:
name: 'Lint and Test'
runs-on: ubuntu-latest
env:
FLOW_CONTEXT: Testing
DISTRIBUTION_FOLDER: neos-distribution
PACKAGE_FOLDER: Neos.Neos.Ui
defaults:
run:
working-directory: ${{ env.DISTRIBUTION_FOLDER }}
strategy:
fail-fast: false
matrix:
include:
- php-version: '8.4'
neos-version: '9.2'
- php-version: '8.5'
neos-version: '9.2'
services:
mariadb:
# see https://mariadb.com/kb/en/mariadb-server-release-dates/
# this should be a current release, e.g. the LTS version
image: mariadb:10.6
env:
MYSQL_USER: neos
MYSQL_PASSWORD: neos
MYSQL_DATABASE: neos_functional_testing
MYSQL_ROOT_PASSWORD: neos
ports:
- "3306:3306"
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: ${{ env.PACKAGE_FOLDER }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, xml, json, zlib, iconv, intl, pdo_sqlite, mysql
- name: Checkout development distribution
uses: actions/checkout@v4
with:
repository: neos/neos-development-distribution
ref: ${{ matrix.neos-version }}
path: ${{ env.DISTRIBUTION_FOLDER }}
- name: Cache Composer packages
uses: actions/cache@v4
timeout-minutes: 30
with:
path: |
~/.cache/composer
${{ env.DISTRIBUTION_FOLDER }}/Packages
key: php-${{ matrix.php-version }}-neos-${{ matrix.neos-version }}-${{ hashFiles('**/composer.json') }}
restore-keys: php-${{ matrix.php-version }}-neos-${{ matrix.neos-version }}-
- name: Prepare Neos.Neos.Ui Package for composer installation
run: |
cd "../${{ env.PACKAGE_FOLDER }}"
# no "neos/neos-ui-compiled" because this job is just for PHP
composer remove neos/neos-ui-compiled --no-update
# install also export-ignore'd Test/ directory
rm .gitattributes
- name: Install and link composer dependencies
run: |
composer config --no-plugins allow-plugins.neos/composer-plugin true
composer config repositories.package '{ "type": "path", "url": "../${{ env.PACKAGE_FOLDER }}", "options": { "symlink": false } }'
composer require --no-update --no-interaction neos/neos-ui:@dev
composer install --no-interaction --no-progress --prefer-dist
- name: Linting
run: |
cd Packages/Application/Neos.Neos.Ui
composer run lint
- name: Run Unit tests
run: |
bin/phpunit -c Build/BuildEssentials/PhpUnit/UnitTests.xml Packages/Application/Neos.Neos.Ui/Tests/Unit/
- name: Run Functional tests
run: |
bin/phpunit -c Build/BuildEssentials/PhpUnit/FunctionalTests.xml Packages/Application/Neos.Neos.Ui/Tests/Functional
- name: Setup Flow configuration
run: |
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: 'neos_functional_testing'
EOF
- name: Run Behavioral tests
run: |
FLOW_CONTEXT=Testing/Behat ./flow doctrine:migrate --quiet
cd Packages/Application/Neos.Neos.Ui
FLOW_CONTEXT=Testing/Behat composer run test:behavioral
- name: Show Flow logs and exceptions on failure
if: ${{ failure() }}
run: |
for file in Data/Logs/*.log; do
echo $file
cat $file
echo "\n"
echo "\n"
done
if [ -d "Data/Logs/Exceptions" ]; then
echo "Exceptions (Data/Logs/Exceptions)"
for file in Data/Logs/Exceptions/*; do
echo $file
cat $file
echo "\n"
echo "\n"
done
fi