Newer
Older
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
stages:
- test
- prepare
- main
black:
stage: test
image:
name: houzefaabba/python3-black
entrypoint: [/bin/busybox]
script:
- black --check -l79 .
# TODO move standard configuration to our own image
flake8:
stage: test
image:
name: xcgd/flake8:3
entrypoint: [/bin/busybox]
script:
- flake8
isort:
stage: test
image: xcgd/isort:odoo
script:
- isort --check-only --diff
get_odoo_scripts:
stage: prepare
image:
name: jamesnetherton/mercurial
entrypoint: [""]
artifacts:
paths:
- odoo_scripts
script:
- hg clone https://orus.io/xcg/odoo_scripts
test:
stage: main
image:
name: registry.xcg.io/odoo/odoo:11.0
entrypoint: [""]
services:
- name: postgres:11-alpine
variables:
POSTGRES_DB: test
POSTGRES_USER: odoo
POSTGRES_PASSWORD: odoo
PGPASSFILE: /var/tmp/.pgpass
script:
# Fetch odoo_scripts dependencies for do_tests
- apt-get -q update && DEBIAN_FRONTEND=noninteractive apt-get -q -y install zsh
# PostgreSQL tweaks.
- "echo \"postgres:5432:*:odoo:odoo\" > $PGPASSFILE"
- chmod 0600 $PGPASSFILE
- chown odoo $PGPASSFILE
# Run tests.
- export PGPASSFILE=$PGPASSFILE
- ./odoo_scripts/do_tests postgres odoo