Skip to content
Snippets Groups Projects
Commit 40acfc98a2ee authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:rocket: run tests

parent a7dececeef7c
No related branches found
No related tags found
No related merge requests found
Pipeline #
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
[odoo_scripts]
modules = ../account_period
other_sources =
odoo_type = odoo11
module_list = account_period
module_list_tests = account_period
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment