-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path.gitlab-ci-2.yml
68 lines (63 loc) · 2 KB
/
.gitlab-ci-2.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
image: python:3.5
stages:
- test
services:
- postgres:10
variables:
POSTGRES_DB: project_ci_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ""
TEST_DBNAME: "${CI_PROJECT_PATH_SLUG}-pipeline-${CI_PIPELINE_ID}"
DEPLOY_DBNAME: "${CI_PROJECT_PATH_SLUG}-${CI_COMMIT_REF_SLUG}"
RUNNER_HOME: "/home/gitlab-runner"
INSTANCE_PATH: "${RUNNER_HOME}/instances/${CI_PROJECT_PATH_SLUG}-${CI_COMMIT_REF_SLUG}"
TRAVIS_BUILD_DIR: "$CI_PROJECT_DIR"
VERSION: "11.0"
ODOO_BRANCH: "11.0"
ODOO_REPO: "odoo/odoo"
before_script:
- curl -sL https://deb.nodesource.com/setup_10.x | bash -
- apt-get install -y sudo postgresql-client expect-dev python-lxml nodejs python-dev
python-pip build-essential libsasl2-dev python-dev libldap2-dev libssl-dev
- pip install codecov==2.0.15 coveralls==1.8.2 coverage
lint:
stage: test
tags:
- postgres
- docker
variables:
LINT_CHECK: "1"
TESTS: "0"
script:
# We need to export the PG* here, otherwise the postgresql container
# Wil pick them up
- export PGHOST="postgres"
- export PGUSER="postgres"
- export PGPASSWORD=""
- git clone https://github.com/OCA/maintainer-quality-tools.git -b master
${HOME}/maintainer-quality-tools
- export PATH=${HOME}/maintainer-quality-tools/travis:${HOME}/gitlab_tools:${PATH}
- travis_install_nightly
- travis_run_tests
- travis_after_tests_success || true
test:
stage: test
tags:
- postgres
- docker
variables:
LINT_CHECK: "0"
TESTS: "1"
script:
# We need to export the PG* here, otherwise the postgresql container
# Wil pick them up
- export PGHOST="postgres"
- export PGUSER="postgres"
- export PGPASSWORD=""
- git clone https://github.com/OCA/maintainer-quality-tools.git -b master
${HOME}/maintainer-quality-tools
- export PATH=${HOME}/maintainer-quality-tools/travis:${HOME}/gitlab_tools:${PATH}
- travis_install_nightly
- travis_run_tests
- travis_after_tests_success || true
coverage: "/TOTAL.+ ([0-9]{1,3}%)/"