-
-
Notifications
You must be signed in to change notification settings - Fork 8
98 lines (82 loc) · 3.01 KB
/
Copy pathtests.yml
File metadata and controls
98 lines (82 loc) · 3.01 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
name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
PACKAGE_FOLDER: Shel.Neos.Terminal
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions:
- '8.2'
neosVersion:
- '9.0'
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.8
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
name: 'Terminal with Neos ${{ matrix.neosVersion }} test'
env:
NEOS_TARGET_VERSION: ${{matrix.neosVersion}}
FLOW_CONTEXT: Testing
FLOW_FOLDER: ../neos-base-distribution
steps:
- uses: actions/checkout@v3
- name: Set package branch name
run: echo "PACKAGE_TARGET_VERSION=${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_ENV
working-directory: .
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, xml, json, zlib, iconv, intl, pdo_sqlite, mysql
tools: composer:v2
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.composer/cache
key: dependencies-composer-${{ hashFiles('composer.json') }}
- name: Prepare Flow distribution
run: |
git clone https://github.com/neos/neos-base-distribution.git -b ${NEOS_TARGET_VERSION} ${FLOW_FOLDER}
cd ${FLOW_FOLDER}
git -C ../${{ env.PACKAGE_FOLDER }} checkout -b build
composer config repositories.package '{ "type": "path", "url": "../${{ env.PACKAGE_FOLDER }}", "options": { "symlink": false } }'
composer require --no-update --no-interaction shel/neos-terminal:"dev-build as dev-${PACKAGE_TARGET_VERSION}"
composer require --no-update --no-interaction neos/contentgraph-doctrinedbaladapter:"~9.0.0"
- name: Composer Install
run: |
cd ${FLOW_FOLDER}
composer update --no-interaction --no-progress
- name: Setup Flow configuration
run: |
cd ${FLOW_FOLDER}
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 Functional tests
run: |
cd ${FLOW_FOLDER}
bin/phpunit --colors -c Build/BuildEssentials/PhpUnit/FunctionalTests.xml Packages/Plugins/Shel.Neos.Terminal/Tests/Functional/*