2021-02-06 19:28:08 +01:00
|
|
|
.cic_ussd_variables:
|
|
|
|
variables:
|
|
|
|
APP_NAME: cic-ussd
|
2021-08-21 19:23:43 +02:00
|
|
|
DOCKERFILE_PATH: docker/Dockerfile_ci
|
|
|
|
CONTEXT: apps/$APP_NAME
|
2021-02-06 16:13:47 +01:00
|
|
|
|
2021-08-21 19:23:43 +02:00
|
|
|
build-mr-cic-ussd:
|
|
|
|
extends:
|
|
|
|
- .py_build_merge_request
|
|
|
|
- .cic_ussd_variables
|
|
|
|
rules:
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
|
|
changes:
|
|
|
|
- apps/cic-ussd/**/*
|
|
|
|
when: always
|
2021-07-10 17:46:14 +02:00
|
|
|
|
|
|
|
test-mr-cic-ussd:
|
|
|
|
stage: test
|
|
|
|
extends:
|
|
|
|
- .cic_ussd_variables
|
|
|
|
cache:
|
2021-08-21 19:23:43 +02:00
|
|
|
key:
|
|
|
|
files:
|
|
|
|
- test_requirements.txt
|
|
|
|
paths:
|
|
|
|
- /root/.cache/pip
|
|
|
|
image: $MR_IMAGE_TAG
|
2021-07-10 17:46:14 +02:00
|
|
|
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
|
2021-08-06 18:29:01 +02:00
|
|
|
- export PYTHONPATH=. && pytest -x --cov=cic_ussd --cov-fail-under=90 --cov-report term-missing tests/cic_ussd
|
2021-08-21 19:23:43 +02:00
|
|
|
needs: ["build-mr-cic-ussd"]
|
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-08-21 19:23:43 +02:00
|
|
|
|
|
|
|
build-push-cic-ussd:
|
|
|
|
extends:
|
|
|
|
- .py_build_push
|
|
|
|
- .cic_ussd_variables
|
|
|
|
rules:
|
|
|
|
- if: $CI_COMMIT_BRANCH == "master"
|
|
|
|
changes:
|
|
|
|
- apps/cic-ussd/**/*
|
|
|
|
when: always
|
|
|
|
|
|
|
|
|