cic-internal-integration/apps/cic-eth/.gitlab-ci.yml

42 lines
1022 B
YAML
Raw Normal View History

.cic_eth_variables:
variables:
APP_NAME: cic-eth
DOCKERFILE_PATH: docker/Dockerfile_ci
CONTEXT: $CI_PROJECT_DIR/apps/$APP_NAME
.cic_eth_changes_target:
2021-02-01 18:12:51 +01:00
rules:
2021-05-25 18:22:26 +02:00
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
#changes:
#- $CONTEXT/$APP_NAME/**/*
when: always
build-mr-cic-eth:
extends:
2021-05-25 18:22:26 +02:00
- .cic_eth_variables
- .cic_eth_changes_target
- .py_build_target_dev
2021-05-25 18:22:26 +02:00
test-mr-cic-eth:
stage: test
2021-05-25 18:22:26 +02:00
extends:
- .cic_eth_variables
2021-05-25 18:22:26 +02:00
- .cic_eth_changes_target
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
image: $MR_IMAGE_TAG
2021-05-25 18:22:26 +02:00
script:
- cd apps/$APP_NAME/
- pip install -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-02-01 18:12:51 +01:00
build-push-cic-eth:
2021-02-01 18:12:51 +01:00
extends:
- .py_build_push
- .cic_eth_variables