forked from instride-ch/pimcore-data-definitions
-
Notifications
You must be signed in to change notification settings - Fork 0
110 lines (92 loc) · 3.54 KB
/
behat.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
name: Behat
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
behat:
runs-on: ubuntu-latest
env:
APP_ENV: "test"
IM_SKIP_DB_SETUP: "1"
PIMCORE_INSTALL_ADMIN_USERNAME: "admin"
PIMCORE_INSTALL_ADMIN_PASSWORD: "admin"
PIMCORE_INSTALL_MYSQL_HOST_SOCKET: "127.0.0.1"
PIMCORE_INSTALL_MYSQL_USERNAME: "root"
PIMCORE_INSTALL_MYSQL_PASSWORD: "root"
PIMCORE_INSTALL_MYSQL_DATABASE: "data_defs_test"
PIMCORE_INSTALL_MYSQL_PORT: "3306"
PIMCORE_KERNEL_CLASS: 'Kernel'
PIMCORE_CLASS_DIRECTORY: 'var/tmp/behat/var/classes'
PIMCORE_WRITE_TARGET_STATICROUTES: 'settings-store'
PIMCORE_TEST_DB_DSN: "mysql://root:[email protected]:3306/data_defs_test"
services:
database:
image: "mariadb:10.5"
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: data_defs_test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
name: "${{ matrix.pimcore }}, PHP ${{ matrix.php }}"
strategy:
matrix:
php: [ 8.0, 8.1 ]
pimcore: [ ^10.5 ]
steps:
- uses: actions/checkout@v2
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: intl, gd, simpleXML, dom, exif, fileinfo, iconv, mbstring, mysqli, pdo_mysql, zip, zlib
- name: Check PHP Version
run: php -v
- name: Setup DB
run: |
mysql --host 127.0.0.1 --port ${{ job.services.database.ports['3306'] }} -uroot -proot -e "CREATE DATABASE coreshop_test CHARSET=utf8mb4;"
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies highest
run: |
composer req guzzlehttp/psr7 pimcore/pimcore:${{ matrix.pimcore }} --no-interaction --no-scripts --no-update
composer update --no-progress --prefer-dist --optimize-autoloader
- name: Cache clear
run: bin/console cache:clear
- name: Assets Install
run: bin/console assets:install --symlink
- name: Install Pimcore
run: PIMCORE_KERNEL_CLASS=Kernel vendor/bin/pimcore-install --ignore-existing-config --env=test --skip-database-config
- name: Install DataDefinitions
run: bin/console pimcore:bundle:install DataDefinitionsBundle
- name: Run Behat
run: vendor/bin/behat --strict --no-interaction -vvv -f progress --config behat.yml.dist -p default
- name: Upload Behat logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: "Behat logs (non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.pimcore }})"
path: etc/build/
if-no-files-found: ignore
- name: Upload Pimcore logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: "Pimcore logs (non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.pimcore }})"
path: var/log/
if-no-files-found: ignore