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
64
65
66
67
stages:
- test
- prepare
- main
black:
stage: test
image:
name: houzefaabba/python3-black
entrypoint: [/bin/busybox]
script:
- black --check -l79 .
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: xcgd/confman:evolve
artifacts:
paths:
- odoo_scripts
expire_in: 1h
script:
- hg clone https://orus.io/xcg/odoo_scripts
# change to coverage topic to test
- cd odoo_scripts
- hg update coverage-in-tests
test:
stage: main
image:
name: registry.xcg.io/odoo/odoo:11.0-bionic
entrypoint: [""]
services:
- name: postgres:11-alpine
cache:
paths:
- .cache
variables:
POSTGRES_DB: test
POSTGRES_USER: odoo
POSTGRES_PASSWORD: odoo
POSTGRES_HOST_AUTH_METHOD: trust
DEBIAN_FRONTEND: noninteractive
before_script:
- mkdir -p $CI_PROJECT_DIR/.cache/apt/archives/partial
# Fetch odoo_scripts dependencies for do_tests
- apt-get -q -o dir::cache::archives="$CI_PROJECT_DIR/.cache/apt" update
- apt-get -q -y -o dir::cache::archives="$CI_PROJECT_DIR/.cache/apt" install zsh
script:
# Run tests
- ./odoo_scripts/do_tests postgres odoo
- python3-coverage report -m
coverage: '/TOTAL.+ ([0-9]{1,3}%)/'