2021-02-05 21:49:15 +01:00
|
|
|
.cic_eth_variables:
|
2021-02-05 17:06:31 +01:00
|
|
|
variables:
|
|
|
|
APP_NAME: cic-eth
|
2021-07-06 19:30:12 +02:00
|
|
|
DOCKERFILE_PATH: docker/Dockerfile_ci
|
2021-07-06 22:27:32 +02:00
|
|
|
CONTEXT: apps/$APP_NAME
|
2021-02-05 16:53:15 +01:00
|
|
|
|
2021-07-06 21:51:53 +02:00
|
|
|
build-mr-cic-eth:
|
|
|
|
extends:
|
|
|
|
- .cic_eth_variables
|
|
|
|
- .py_build_target_dev
|
2021-02-01 18:12:51 +01:00
|
|
|
rules:
|
2021-05-25 18:22:26 +02:00
|
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
2021-07-06 21:36:17 +02:00
|
|
|
changes:
|
2021-07-06 21:54:36 +02:00
|
|
|
- apps/cic-eth/**/*
|
2021-05-25 18:22:26 +02:00
|
|
|
when: always
|
|
|
|
|
|
|
|
test-mr-cic-eth:
|
2021-07-06 19:02:56 +02:00
|
|
|
stage: test
|
2021-05-25 18:22:26 +02:00
|
|
|
extends:
|
2021-02-05 21:49:15 +01:00
|
|
|
- .cic_eth_variables
|
2021-07-06 21:10:49 +02:00
|
|
|
cache:
|
|
|
|
key:
|
2021-07-06 21:11:51 +02:00
|
|
|
files:
|
|
|
|
- test_requirements.txt
|
2021-07-06 21:10:49 +02:00
|
|
|
paths:
|
|
|
|
- /root/.cache/pip
|
2021-07-06 20:12:32 +02:00
|
|
|
image: $MR_IMAGE_TAG
|
2021-05-25 18:22:26 +02:00
|
|
|
script:
|
|
|
|
- cd apps/$APP_NAME/
|
2021-07-07 23:33:32 +02:00
|
|
|
- |
|
|
|
|
pip install --extra-index-url https://pip.grassrootseconomics.net:8433 \
|
2021-07-07 23:24:26 +02:00
|
|
|
--extra-index-url https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple \
|
|
|
|
-r test_requirements.txt
|
2021-07-06 21:00:09 +02:00
|
|
|
- export PYTHONPATH=. && pytest -x --cov=cic_eth --cov-fail-under=90 --cov-report term-missing tests
|
2021-05-25 18:22:26 +02:00
|
|
|
needs: ["build-mr-cic-eth"]
|
2021-07-06 21:51:53 +02:00
|
|
|
rules:
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
|
|
changes:
|
2021-07-06 21:54:36 +02:00
|
|
|
- apps/cic-eth/**/*
|
2021-07-06 21:51:53 +02:00
|
|
|
when: always
|
2021-02-01 18:12:51 +01:00
|
|
|
|
2021-02-05 16:53:15 +01:00
|
|
|
build-push-cic-eth:
|
2021-02-01 18:12:51 +01:00
|
|
|
extends:
|
2021-02-05 16:53:15 +01:00
|
|
|
- .py_build_push
|
2021-02-05 21:49:15 +01:00
|
|
|
- .cic_eth_variables
|
2021-07-06 21:51:53 +02:00
|
|
|
rules:
|
|
|
|
- if: $CI_COMMIT_BRANCH == "master"
|
|
|
|
changes:
|
2021-07-06 21:54:36 +02:00
|
|
|
- apps/cic-eth/**/*
|
2021-07-06 21:51:53 +02:00
|
|
|
when: always
|