forked from stoq/stoq-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
63 lines (55 loc) · 1.31 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
image: cprov/stoq:candidate
services:
- postgres:9.5
variables:
# Fetch utils/ submodule
GIT_SUBMODULE_STRATEGY: recursive
POSTGRES_DB: test
POSTGRES_USER: test
POSTGRES_PASSWORD: ""
POSTGRES_HOST_AUTH_METHOD: trust
STOQLIB_TEST_HOSTNAME: "postgres"
STOQLIB_TEST_DBNAME: "test"
STOQLIB_TEST_USERNAME: "test"
STOQLIB_TEST_PASSWORD: ""
stages:
- test
- build
before_script:
# Install stoqlib from master.
- apt update
- apt --yes install libcairo2-dev
- git clone https://github.com/stoq/stoq.git --depth 1
- easy_install3 pip
- pip install -U setuptools pip
- pip install pycairo
- pip install -e stoq --no-deps
- pip install -r requirements-test.txt
- pip install kiwi-gtk
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/stoqtech/private/stoq-plugin-ifood.git
- pip install -e stoq-plugin-ifood --no-deps
- pip freeze
test:
stage: test
script:
- make coverage
.create_deb:
stage: build
script:
# Install tools to create debian packages
- apt update
- python --version
- python2 --version
- apt --yes install devscripts debhelper python3-all
- rm -rf dist
- make deb
artifacts:
paths:
- dist/*.deb
create_deb_master:
extends: .create_deb
only:
- master
create_deb_manual:
extends: .create_deb
when: manual