forked from shopware/shopware
-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (104 loc) · 3.12 KB
/
02-unit.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
name: Unit
on:
push:
branches:
- trunk
pull_request:
jobs:
php:
name: "PHPUnit with PHP ${{ matrix.php-version }}"
runs-on: ubuntu-latest
container: "shopware/development:${{ matrix.php-version }}-composer-2"
strategy:
matrix:
php-version: ["7.4", "8.0", "8.1"]
env:
TEST_SUITES: 'administration storefront checkout content framework profiling migration system elasticsearch docs'
APP_ENV: test
DATABASE_URL: mysql://root:root@database:3306/root
APP_URL: http://localhost:8000
APP_SECRET: devsecret
SHOPWARE_ES_HOSTS: elasticsearch:9200
BLUE_GREEN_DEPLOYMENT: 1
services:
database:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: root
elasticsearch:
image: elastic/elasticsearch:7.8.0
env:
discovery.type: single-node
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Shopware
run: |
composer run setup
- name: Run PHPUnit
run: |
for TEST_SUITE in $TEST_SUITES; do php -d memory_limit=-1 vendor/bin/phpunit --configuration phpunit.xml.dist --exclude-group needsWebserver --testsuite "$TEST_SUITE"; done
admin:
runs-on: ubuntu-latest
name: "Jest Admin"
container: shopware/development:7.4-composer-2
env:
APP_ENV: prod
DATABASE_URL: mysql://root:root@database:3306/root
APP_URL: http://localhost:8000
APP_SECRET: devsecret
SHOPWARE_ES_HOSTS: elasticsearch:9200
BLUE_GREEN_DEPLOYMENT: 1
services:
database:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: root
elasticsearch:
image: elasticsearch:7.8.0
env:
discovery.type: single-node
steps:
- name: Clone platform
uses: actions/checkout@v2
- name: Install Shopware
run: |
composer run setup
- name: Run Jest Admin
run: |
bin/console framework:schema -s 'entity-schema' src/Administration/Resources/app/administration/test/_mocks_/entity-schema.json
npm --prefix src/Administration/Resources/app/administration run unit -- --silent
storefront:
name: "Jest Storefront"
runs-on: ubuntu-latest
container: shopware/development:7.4-composer-2
env:
APP_ENV: prod
DATABASE_URL: mysql://root:root@database:3306/root
APP_URL: http://localhost:8000
APP_SECRET: devsecret
SHOPWARE_ES_HOSTS: elasticsearch:9200
BLUE_GREEN_DEPLOYMENT: 1
services:
database:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: root
elasticsearch:
image: elasticsearch:7.8.0
env:
discovery.type: single-node
steps:
- name: Clone platform
uses: actions/checkout@v2
- name: Install Shopware
run: |
composer run setup
- name: Run Jest Storefront
run: |
npm --prefix src/Storefront/Resources/app/storefront run unit -- --silent