-
Notifications
You must be signed in to change notification settings - Fork 5
177 lines (135 loc) · 5.51 KB
/
integration.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
name: Integration
on:
push:
branches:
- main
pull_request:
env:
APP_ENV: prod
SALES_CHANNEL_URL: http://localhost:8000
DATABASE_URL: mysql://[email protected]/shopware
jobs:
installation:
name: Install a Shopware Shop
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
tools: symfony-cli
- name: Start Default MySQL
run: |
sudo mv /var/lib/mysql /var/lib/mysql-old
sudo mkdir /var/lib/mysql
sudo mount -t tmpfs tmpfs /var/lib/mysql -o size=1G
sudo -u mysql mysqld --datadir=/var/lib/mysql --default-time-zone=SYSTEM --initialize-insecure
sudo systemctl start mysql
- name: Create new Shopware Project
run: composer create-project shopware/production . --no-interaction
- name: Checkout
uses: actions/checkout@v4
with:
path: ./custom/plugins/deployment-helper
- name: Set fake version into deployment helper
run: composer -d custom/plugins/deployment-helper config version 999.9.9
- name: Install Deployment Helper
run: composer require --dev 'shopware/deployment-helper:*'
- name: Install PayPal
run: composer require 'swag/paypal:*'
- name: Install Shopware using Helper
run: ./vendor/bin/shopware-deployment-helper run
- name: Start Webserver
run: symfony server:start -d --no-tls --allow-all-ip
- name: PayPal plugin should be installed
run: ./bin/console plugin:list | grep SwagPayPal
- name: Default Storefront should be available
run: curl -q --fail http://localhost:8000
installation-with-retry:
name: Install a Shopware Shop with Retry
runs-on: ubuntu-latest
env:
SHOPWARE_DEPLOYMENT_FORCE_REINSTALL: 1
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
tools: symfony-cli
- name: Start Default MySQL
run: |
sudo mv /var/lib/mysql /var/lib/mysql-old
sudo mkdir /var/lib/mysql
sudo mount -t tmpfs tmpfs /var/lib/mysql -o size=1G
sudo -u mysql mysqld --datadir=/var/lib/mysql --default-time-zone=SYSTEM --initialize-insecure
sudo systemctl start mysql
- name: Create new Shopware Project
run: composer create-project shopware/production . --no-interaction
- name: Checkout
uses: actions/checkout@v4
with:
path: ./custom/plugins/deployment-helper
- name: Set fake version into deployment helper
run: composer -d custom/plugins/deployment-helper config version 999.9.9
- name: Install Deployment Helper
run: composer require --dev 'shopware/deployment-helper:*'
- name: Install PayPal
run: composer require 'swag/paypal:*'
- name: Install Shopware and kill it after some seconds
run: timeout 10 ./vendor/bin/shopware-deployment-helper run || true
- name: Retry the Installation
run: ./vendor/bin/shopware-deployment-helper run
- name: Ensure the admin user exists
run: ./bin/console user:list | grep [email protected]
- name: Start Webserver
run: symfony server:start -d --no-tls --allow-all-ip
- name: PayPal plugin should be installed
run: ./bin/console plugin:list | grep SwagPayPal
- name: Default Storefront should be available
run: curl -q --fail http://localhost:8000
update:
name: Update from 6.5
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
tools: symfony-cli
- name: Start Default MySQL
run: |
sudo mv /var/lib/mysql /var/lib/mysql-old
sudo mkdir /var/lib/mysql
sudo mount -t tmpfs tmpfs /var/lib/mysql -o size=1G
sudo -u mysql mysqld --datadir=/var/lib/mysql --default-time-zone=SYSTEM --initialize-insecure
sudo systemctl start mysql
- name: Create new Shopware Project
run: composer create-project shopware/production:6.5.8.8 . --no-interaction
- name: Checkout
uses: actions/checkout@v4
with:
path: ./custom/plugins/deployment-helper
- name: Set fake version into deployment helper
run: composer -d custom/plugins/deployment-helper config version 999.9.9
- name: Install Deployment Helper
run: composer require --dev 'shopware/deployment-helper:*'
- name: Install PayPal
run: composer require 'swag/paypal:*'
- name: Install Shopware using Helper
run: ./vendor/bin/shopware-deployment-helper run
- name: Start Webserver
run: symfony server:start -d --no-tls --allow-all-ip
- name: PayPal plugin should be installed
run: ./bin/console plugin:list | grep SwagPayPal
- name: Default Storefront should be available
run: curl -q --fail http://localhost:8000
- name: Update to latest version
run: composer require "shopware/core:*" "swag/paypal:*" -W --no-interaction --no-scripts
- name: Update recipes
run: yes | composer recipes:install --force --reset
- name: Update Shopware using Helper
run: ./vendor/bin/shopware-deployment-helper run
- name: Check that a major update was performed
run: ./bin/console --version | grep -v " 6.5."
- name: Default Storefront should be available
run: curl -q --fail http://localhost:8000