2021-02-18 06:04:30 +01:00
|
|
|
.cic_cache_variables:
|
|
|
|
variables:
|
|
|
|
APP_NAME: cic-cache
|
2021-07-10 17:46:14 +02:00
|
|
|
CONTEXT: apps/$APP_NAME
|
2021-02-18 06:04:30 +01:00
|
|
|
|
2021-08-19 16:25:58 +02:00
|
|
|
#build-mr-cic-cache:
|
|
|
|
# extends:
|
|
|
|
# - .py_build_merge_request
|
|
|
|
# - .cic_cache_variables
|
|
|
|
# rules:
|
|
|
|
# - if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
|
|
# changes:
|
|
|
|
# - apps/cic-cache/**/*
|
|
|
|
# when: always
|
2021-07-10 17:46:14 +02:00
|
|
|
|
|
|
|
test-mr-cic-cache:
|
|
|
|
stage: test
|
|
|
|
extends:
|
|
|
|
- .cic_cache_variables
|
|
|
|
cache:
|
|
|
|
key:
|
|
|
|
files:
|
|
|
|
- test_requirements.txt
|
|
|
|
paths:
|
|
|
|
- /root/.cache/pip
|
|
|
|
image: $MR_IMAGE_TAG
|
|
|
|
script:
|
|
|
|
- cd apps/$APP_NAME/
|
|
|
|
- >
|
|
|
|
pip install --extra-index-url https://pip.grassrootseconomics.net:8433
|
|
|
|
--extra-index-url https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple
|
|
|
|
-r test_requirements.txt
|
|
|
|
- export PYTHONPATH=. && pytest -x --cov=cic_cache --cov-fail-under=90 --cov-report term-missing tests
|
2021-08-19 16:25:58 +02:00
|
|
|
needs: ["build-merge-request"]
|
2021-07-10 17:46:14 +02:00
|
|
|
rules:
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
|
|
changes:
|
2021-07-12 18:14:33 +02:00
|
|
|
- apps/$APP_NAME/**/*
|
2021-07-10 17:46:14 +02:00
|
|
|
when: always
|
2021-02-18 06:04:30 +01:00
|
|
|
|
2021-08-19 16:25:58 +02:00
|
|
|
#build-push-cic-cache:
|
|
|
|
# extends:
|
|
|
|
# - .py_build_push
|
|
|
|
# - .cic_cache_variables
|
|
|
|
# rules:
|
|
|
|
# - if: $CI_COMMIT_BRANCH == "master"
|
|
|
|
# changes:
|
|
|
|
# - apps/cic-cache/**/*
|
|
|
|
# when: always
|
2021-02-18 06:04:30 +01:00
|
|
|
|
|
|
|
|