-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
232 lines (201 loc) · 7.11 KB
/
.gitlab-ci.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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
################################################################################
#
# This file is part of SplashSync Project.
#
# Copyright (C) Splash Sync <www.splashsync.com>
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
################################################################################
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
################################################################
# Defined Pipeline Stages
stages:
- Contacts
- Products
- Orders
- Invoices
- deploy
################################################################
# Init & Functional Tests
################################################################
.functional: &functional
image: docker/compose
# when: manual
retry: 1
tags:
- Dedicated-Docker
services:
- docker:dind
artifacts:
name: "$CI_JOB_NAME"
when: always
paths:
- logs
before_script:
- sh ci/before_script.sh
script:
- sh ci/start_odoo.sh
- sh ci/test_odoo.sh
after_script:
- sh ci/after_script.sh
################################################################
# Contacts - Functional Tests
################################################################
# ALL TESTS PASSED
V12:Contacts:
<<: *functional
stage: Contacts
variables: { ODOO_VERSION: 12, PHPUNIT_CONFIG: phpunit.contacts.xml }
# when: always
V13:Contacts:
<<: *functional
stage: Contacts
variables: { ODOO_VERSION: 13, PHPUNIT_CONFIG: phpunit.contacts.xml }
# when: always
V14:Contacts:
<<: *functional
stage: Contacts
variables: { ODOO_VERSION: 14, PHPUNIT_CONFIG: phpunit.contacts.xml }
# when: always
V15:Contacts:
<<: *functional
stage: Contacts
variables: { ODOO_VERSION: 15, PHPUNIT_CONFIG: phpunit.contacts.xml }
# when: always
V16:Contacts:
<<: *functional
stage: Contacts
variables: { ODOO_VERSION: 16, PHPUNIT_CONFIG: phpunit.contacts.xml }
allow_failure: true
# when: always
#################################################################
## Products - Functional Tests
#################################################################
V12:Products:
<<: *functional
stage: Products
variables: { ODOO_VERSION: 12, PHPUNIT_CONFIG: phpunit.products.xml }
# when: always
V13:Products:
<<: *functional
stage: Products
variables: { ODOO_VERSION: 13, PHPUNIT_CONFIG: phpunit.products.xml }
# when: always
V14:Products:
<<: *functional
stage: Products
variables: { ODOO_VERSION: 14, PHPUNIT_CONFIG: phpunit.products.xml }
# when: always
V15:Products:
<<: *functional
stage: Products
variables: { ODOO_VERSION: 15, PHPUNIT_CONFIG: phpunit.products.xml }
# when: always
V16:Products:
<<: *functional
stage: Products
variables: { ODOO_VERSION: 16, PHPUNIT_CONFIG: phpunit.products.xml }
allow_failure: true
# when: always
#################################################################
## Orders - Functional Tests
#################################################################
V12:Orders:
<<: *functional
stage: Orders
variables: { ODOO_VERSION: 12, PHPUNIT_CONFIG: phpunit.orders.xml }
# when: always
V13:Orders:
<<: *functional
stage: Orders
variables: { ODOO_VERSION: 13, PHPUNIT_CONFIG: phpunit.orders.xml }
# when: always
V14:Orders:
<<: *functional
stage: Orders
variables: { ODOO_VERSION: 14, PHPUNIT_CONFIG: phpunit.orders.xml }
# when: always
V15:Orders:
<<: *functional
stage: Orders
variables: { ODOO_VERSION: 15, PHPUNIT_CONFIG: phpunit.orders.xml }
# when: always
V16:Orders:
<<: *functional
stage: Orders
variables: { ODOO_VERSION: 16, PHPUNIT_CONFIG: phpunit.orders.xml }
allow_failure: true
# when: always
#################################################################
## Invoices - Functional Tests
#################################################################
V12:Invoices:
<<: *functional
stage: Invoices
variables: { ODOO_VERSION: 12, PHPUNIT_CONFIG: phpunit.invoices.xml }
# when: always
V13:Invoices:
<<: *functional
stage: Invoices
variables: { ODOO_VERSION: 13, PHPUNIT_CONFIG: phpunit.invoices.xml }
# when: always
V14:Invoices:
<<: *functional
stage: Invoices
variables: { ODOO_VERSION: 14, PHPUNIT_CONFIG: phpunit.invoices.xml }
# when: always
V15:Invoices:
<<: *functional
stage: Invoices
variables: { ODOO_VERSION: 15, PHPUNIT_CONFIG: phpunit.invoices.xml }
# when: always
V16:Invoices:
<<: *functional
stage: Invoices
variables: { ODOO_VERSION: 16, PHPUNIT_CONFIG: phpunit.invoices.xml }
allow_failure: true
# when: always
################################################################
# Build Documentation
################################################################
pages:
image: registry.gitlab.com/splashsync/php-console:pages
stage: deploy
retry: 2
tags:
- Dedicated
################################################################################
# Run Test Script
script:
# Run Composer to Build Dependencies
- curl -s https://raw.githubusercontent.com/BadPixxel/Php-Sdk/main/ci/composer.sh | bash
# Build Documentation
- php vendor/bin/grumphp run --tasks=build-docs
artifacts:
paths:
- public
###############################################################
# Build Module
################################################################
module:
image: registry.gitlab.com/badpixxel-projects/php-sdk:php-8.1
stage: deploy
tags: ['Dedicated']
################################################################################
# Run Test Script
script:
# Install Composer Dependencies
- curl -s https://raw.githubusercontent.com/BadPixxel/Php-Sdk/main/ci/composer.sh | bash
# Build Module
- php vendor/bin/grumphp run --tasks=build-module
artifacts:
paths:
- build