-
Notifications
You must be signed in to change notification settings - Fork 43
79 lines (70 loc) · 2.22 KB
/
01-test-installation-process.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
name: Basic Test
on:
workflow_dispatch:
pull_request:
push:
branches:
- '5.*'
env:
DB_USER: shopware
DB_PASSWORD: shopware
DB_HOST: 127.0.0.1
DB_PORT: 3306
DB_NAME: shopware
SW_HOST: localhost
SW_BASE_PATH: ''
jobs:
install:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '7.4', '8.0', '8.1', '8.2' ]
services:
mysql:
image: mariadb:10.6
env:
MYSQL_USER: '${{ env.DB_USER }}'
MYSQL_PASSWORD: '${{ env.DB_PASSWORD }}'
MYSQL_DATABASE: '${{ env.DB_NAME }}'
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
options: '--mount="type=tmpfs,destination=/var/lib/mysql" --health-cmd="mysqladmin ping -h 127.0.0.1" --health-interval=5s --health-timeout=2s --health-retries=3'
ports:
- "3306:3306"
steps:
- uses: actions/cache@v3
with:
path: '/root/.composer/cache/files'
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Configure for PHP 8.2
run: composer require shopware/shopware 5.7.x-dev
if: matrix.php == '8.2'
- name: Composer install
run: composer --no-interaction install
- name: Generate .env
run: |
cat <<EOF > .env
DATABASE_URL="mysql://${{ env.DB_USER }}:${{ env.DB_PASSWORD }}@${{ env.DB_HOST }}:${{ env.DB_PORT }}/${{ env.DB_NAME }}"
ADMIN_EMAIL="[email protected]"
ADMIN_NAME="Demo Admin"
ADMIN_USERNAME="demo"
ADMIN_PASSWORD="demo"
SHOP_URL="http://${{ env.SW_HOST }}${{ env.SW_BASE_PATH }}"
IMPORT_DEMODATA=n
INSTALL_IMAGES=n
EOF
- name: Install
run: echo 'y' | ./app/bin/install.sh
- name: Test listing plugins
run: php bin/console sw:plugin:list
- name: Test dump theme config
run: php bin/console sw:theme:dump:configuration
- name: Test theme compile
run: php bin/console sw:theme:cache:generate