diff options
-rw-r--r-- | .gitlab-ci.yml | 15 | ||||
-rw-r--r-- | setup.py | 3 |
2 files changed, 12 insertions, 6 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 90185356..5a615a93 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,11 @@ stages: - test - deploy image: python:3.7-alpine +variables: + PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache" +cache: + paths: + - .cache .test-template: &test-template stage: test @@ -22,7 +27,7 @@ lint: stage: lint before_script: - apk add python3-dev git libpq postgresql-dev gcc cmake autoconf automake musl-dev - - python3 -m pip install --no-cache-dir .[lint] + - python3 -m pip install .[lint] script: - flake8 tags: @@ -33,7 +38,7 @@ test-3.7-alpine: image: python:3.7-alpine before_script: - apk add python3-dev git libpq postgresql-dev gcc cmake autoconf automake musl-dev - - python3 -m pip install --no-cache-dir .[test] + - python3 -m pip install .[test] - python manage.py migrate script: - coverage run --source=api,home,pysite,wiki --branch manage.py test @@ -48,7 +53,7 @@ test-3.6-alpine: image: python:3.6-alpine before_script: - apk add git libpq postgresql-dev gcc cmake autoconf automake musl-dev - - python3 -m pip install --no-cache-dir .[test] + - python3 -m pip install .[test] - python manage.py migrate test-3.7-stretch: @@ -59,7 +64,7 @@ test-3.7-stretch: before_script: - apt-get update -y - apt-get install -y git libpq-dev gcc cmake autoconf automake libc-dev - - python3 -m pip install --no-cache-dir .[test] + - python3 -m pip install .[test] - python manage.py migrate test-3.6-stretch: @@ -70,7 +75,7 @@ test-3.6-stretch: before_script: - apt-get update -y - apt-get install -y git libpq-dev gcc cmake autoconf automake libc-dev - - python3 -m pip install --no-cache-dir .[test] + - python3 -m pip install .[test] - python manage.py migrate pages: @@ -10,7 +10,8 @@ setup( 'djangorestframework>=3.8.2', 'djangorestframework-bulk>=0.2.1', 'django-hosts>=3.0', - 'django-environ>=0.4.5' + 'django-environ>=0.4.5', + 'psycopg2-binary>=2.7.5' ], extras_require={ 'deploy': [ |