Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #563 from RoelAdriaans/gitlab-ci-update
Browse files Browse the repository at this point in the history
[UPD] Cleanup gitlab-ci file using python-3.5 image
  • Loading branch information
moylop260 committed Jul 25, 2018
2 parents 2077672 + 503d5b7 commit 1afb708
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions sample_files/.gitlab-ci-2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
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 coverage coveralls codecov

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}%)/'

0 comments on commit 1afb708

Please sign in to comment.