Add gitlab ci settings
This commit is contained in:
parent
a798b9858c
commit
88cf5f9bd4
14 changed files with 61 additions and 34 deletions
25
.gitlab-ci.yml
Normal file
25
.gitlab-ci.yml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
services:
|
||||
- postgres:9.6
|
||||
|
||||
variables:
|
||||
POSTGRES_DB: newsreader
|
||||
POSTGRES_USER: newsreader
|
||||
|
||||
python tests:
|
||||
image: python:3.7.4-slim-stretch
|
||||
stage: test
|
||||
variables:
|
||||
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
|
||||
cache:
|
||||
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
|
||||
paths:
|
||||
- .cache/pip
|
||||
- env/
|
||||
before_script:
|
||||
- python3 -m venv env
|
||||
- source env/bin/activate
|
||||
- pip install -r requirements/gitlab.txt
|
||||
script:
|
||||
- python src/manage.py test newsreader --settings=newsreader.conf.gitlab
|
||||
- isort -rc src/ --check-only
|
||||
- black -l 100 --check src/
|
||||
Loading…
Add table
Add a link
Reference in a new issue