-
Notifications
You must be signed in to change notification settings - Fork 27
156 lines (146 loc) · 5.78 KB
/
nightly.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
name: Test nightly
on:
push:
branches:
- add-nightly-jobs
workflow_dispatch:
schedule:
- cron: "3 3 * * * "
jobs:
test:
name: Test ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: 6.4.x
package: ~6.4.0
php: 8.1
node: 18.19.0
conflict-version: ~0.1.0
- name: 6.5.x
package: ~6.5.0
php: 8.1
node: 18
conflict-version: ~0.1.0
- name: trunk
package: 6.6.x-dev
php: 8.2
node: 20
conflict-version: ~0.2.0
env:
APP_ENV: prod
DATABASE_URL: mysql://root:[email protected]:3306/root
APP_URL: http://localhost:8000
APP_SECRET: devsecret
BLUE_GREEN_DEPLOYMENT: 0
NODE_OPTIONS: '--openssl-legacy-provider'
services:
database:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: root
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:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Setup project
run: |
touch .env
touch .gitignore
mkdir -p custom/plugins custom/apps custom/static-plugins
COMPOSER=$(cat <<EOF
{
"name": "shopware/production",
"license": "MIT",
"type": "project",
"require": {
"composer-runtime-api": "^2.0",
"shopware/conflicts": "${{ matrix.conflict-version }}",
"shopware/administration": "${{ matrix.package }}",
"shopware/core": "${{ matrix.package }}",
"shopware/elasticsearch": "${{ matrix.package }}",
"shopware/storefront": "${{ matrix.package }}",
"shopware/dev-tools": "*",
"symfony/flex": "~2",
"symfony/runtime": "^5.0|^6.0|^7.0"
},
"repositories": [
{
"type": "path",
"url": "custom/plugins/*",
"options": {
"symlink": true
}
},
{
"type": "path",
"url": "custom/plugins/*/packages/*",
"options": {
"symlink": true
}
},
{
"type": "path",
"url": "custom/static-plugins/*",
"options": {
"symlink": true
}
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"allow-plugins": {
"symfony/flex": true,
"symfony/runtime": true
},
"optimize-autoloader": true,
"sort-packages": true
},
"scripts": {
"auto-scripts": [
],
"post-install-cmd": [
"@auto-scripts"
],
"post-update-cmd": [
"@auto-scripts"
]
},
"extra": {
"symfony": {
"allow-contrib": true,
"endpoint": [
"https://raw.githubusercontent.com/shopware/recipes/flex/main/index.json",
"flex://defaults"
]
}
}
}
EOF)
echo "$COMPOSER" > composer.json
- name: Test
run: cat composer.json
- name: Install Composer
run: composer install
- name: Install Shopware
run: ./bin/console system:install --basic-setup --create-database
- name: Generate demo data
run: ./bin/console framework:demodata -e prod
- name: DAL refresh
run: ./bin/console dal:refresh:index
- name: Build admin
run: ./bin/build-administration.sh
- name: Build storefront
run: ./bin/build-storefront.sh