Skip to content
Snippets Groups Projects
Commit fbdb6a9e authored by Erwan Rouchet's avatar Erwan Rouchet Committed by Bastien Abadie
Browse files

Split tests and linting in GitLab CI

parent 00c55049
No related branches found
No related tags found
No related merge requests found
image: registry.gitlab.com/arkindex/backend:base-0.8.7
stages:
- test
backend-tests:
stage: test
image: registry.gitlab.com/arkindex/backend:base-0.8.7
cache:
paths:
- .cache/pip
services:
- postgres:latest
before_script:
- apk --update add build-base
# Custom line to install our own deps from Git using GitLab CI credentials
- "pip install -e git+https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/arkindex/common#egg=arkindex-common"
- "pip install -e git+https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/arkindex/ponos#egg=arkindex-ponos"
- pip install -r tests-requirements.txt codecov
variables:
# For the postgres image
POSTGRES_DB: arkindex_dev
POSTGRES_USER: devuser
POSTGRES_PASSWORD: devdata
variables:
# For the postgres image
POSTGRES_DB: arkindex_dev
POSTGRES_USER: devuser
POSTGRES_PASSWORD: devdata
# For the backend
DB_HOST: postgres
DB_PORT: 5432
# For the backend
DB_HOST: postgres
DB_PORT: 5432
# Pip cache
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# Pip cache
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip
backend-tests:
stage: test
before_script:
- apk --update add build-base
# Custom line to install our own deps from Git using GitLab CI credentials
- "pip install -e git+https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/arkindex/common#egg=arkindex-common"
- "pip install -e git+https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/arkindex/ponos#egg=arkindex-ponos"
- pip install -r tests-requirements.txt codecov
services:
- postgres:latest
script:
- python setup.py test
- codecov
backend-lint:
stage: test
script:
- flake8
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