From 8ea77cff6b9b4f76b1d9e19942b7cb1bbcee4df6 Mon Sep 17 00:00:00 2001 From: Blair Vanderlugt Date: Thu, 19 Aug 2021 11:41:49 -0400 Subject: [PATCH] tests for the rests --- apps/cic-eth/.gitlab-ci.yml | 53 +++++++++++++++++----------------- apps/cic-meta/.gitlab-ci.yml | 39 ++++++++++--------------- apps/cic-notify/.gitlab-ci.yml | 47 ++++++++++++------------------ apps/cic-ussd/.gitlab-ci.yml | 45 +++++++++++------------------ 4 files changed, 78 insertions(+), 106 deletions(-) diff --git a/apps/cic-eth/.gitlab-ci.yml b/apps/cic-eth/.gitlab-ci.yml index ef2b7462..9b29a612 100644 --- a/apps/cic-eth/.gitlab-ci.yml +++ b/apps/cic-eth/.gitlab-ci.yml @@ -1,30 +1,30 @@ .cic_eth_variables: variables: APP_NAME: cic-eth - DOCKERFILE_PATH: docker/Dockerfile_ci - CONTEXT: apps/$APP_NAME -build-mr-cic-eth: - extends: - - .cic_eth_variables - - .py_build_target_dev - rules: - - if: $CI_PIPELINE_SOURCE == "merge_request_event" - changes: - - apps/cic-eth/**/* - when: always + #build-mr-cic-eth: + # extends: + # - .cic_eth_variables + # - .py_build_target_dev + # rules: + # - if: $CI_PIPELINE_SOURCE == "merge_request_event" + # changes: + # - apps/cic-eth/**/* + # when: always test-mr-cic-eth: stage: test + tags: + - integration extends: - .cic_eth_variables cache: - key: - files: - - test_requirements.txt + key: + files: + - test_requirements.txt paths: - /root/.cache/pip - image: $MR_IMAGE_TAG + image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/$APP_NAME:$MR_IMAGE_TAG script: - cd apps/$APP_NAME/ - > @@ -34,19 +34,20 @@ test-mr-cic-eth: -r services_requirements.txt -r test_requirements.txt - export PYTHONPATH=. && pytest -x --cov=cic_eth --cov-fail-under=90 --cov-report term-missing tests - needs: ["build-mr-cic-eth"] + allow_failure: true + needs: ["build-merge-request"] rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" changes: - - apps/cic-eth/**/* + - apps/$APP_NAME/**/* when: always -build-push-cic-eth: - extends: - - .py_build_push - - .cic_eth_variables - rules: - - if: $CI_COMMIT_BRANCH == "master" - changes: - - apps/cic-eth/**/* - when: always + #build-push-cic-eth: + # extends: + # - .py_build_push + # - .cic_eth_variables + # rules: + # - if: $CI_COMMIT_BRANCH == "master" + # changes: + # - apps/cic-eth/**/* + # when: always diff --git a/apps/cic-meta/.gitlab-ci.yml b/apps/cic-meta/.gitlab-ci.yml index 8ab7177d..39f2de56 100644 --- a/apps/cic-meta/.gitlab-ci.yml +++ b/apps/cic-meta/.gitlab-ci.yml @@ -5,39 +5,32 @@ DOCKERFILE_PATH: docker/Dockerfile_ci CONTEXT: apps/$APP_NAME -build-mr-cic-meta: - extends: - - .py_build_merge_request - - .cic_meta_variables - rules: - - if: $CI_PIPELINE_SOURCE == "merge_request_event" - changes: - - apps/cic-meta/**/* - when: always + #build-mr-cic-meta: + # extends: + # - .py_build_merge_request + # - .cic_meta_variables + # rules: + # - if: $CI_PIPELINE_SOURCE == "merge_request_event" + # changes: + # - apps/cic-meta/**/* + # when: always test-mr-cic-meta: + stage: test + tags: + - integration extends: - .cic_meta_variables - stage: test - image: $MR_IMAGE_TAG + image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/$APP_NAME:$MR_IMAGE_TAG script: - cd /root - npm install --dev - npm run test - npm run test:coverage - needs: ["build-mr-cic-meta"] + allow_failure: true + needs: ["build-merge-request"] rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" changes: - - apps/cic-meta/**/* - when: always - -build-push-cic-meta: - extends: - - .py_build_push - - .cic_meta_variables - rules: - - if: $CI_COMMIT_BRANCH == "master" - changes: - - apps/cic-meta/**/* + - apps/$APP_NAME/**/* when: always diff --git a/apps/cic-notify/.gitlab-ci.yml b/apps/cic-notify/.gitlab-ci.yml index 1a4ef23e..d369d459 100644 --- a/apps/cic-notify/.gitlab-ci.yml +++ b/apps/cic-notify/.gitlab-ci.yml @@ -1,30 +1,30 @@ .cic_notify_variables: variables: APP_NAME: cic-notify - DOCKERFILE_PATH: docker/Dockerfile_ci - CONTEXT: apps/$APP_NAME -build-mr-cic-notify: - extends: - - .py_build_merge_request - - .cic_notify_variables - rules: - - if: $CI_PIPELINE_SOURCE == "merge_request_event" - changes: - - apps/cic-notify/**/* - when: always + #build-mr-cic-notify: + # extends: + # - .py_build_merge_request + # - .cic_notify_variables + # rules: + # - if: $CI_PIPELINE_SOURCE == "merge_request_event" + # changes: + # - apps/cic-notify/**/* + # when: always test-mr-cic-notify: stage: test + tags: + - integration extends: - - .cic_notify_variables + - .cic_notify_variables cache: - key: - files: - - test_requirements.txt + key: + files: + - test_requirements.txt paths: - /root/.cache/pip - image: $MR_IMAGE_TAG + image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/$APP_NAME:$MR_IMAGE_TAG script: - cd apps/$APP_NAME/ - > @@ -32,21 +32,10 @@ test-mr-cic-notify: --extra-index-url https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple -r test_requirements.txt - export PYTHONPATH=. && pytest -x --cov=cic_notify --cov-fail-under=90 --cov-report term-missing tests - needs: ["build-mr-cic-notify"] + allow_failure: true + needs: ["build-merge-request"] rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" changes: - apps/$APP_NAME/**/* when: always - -build-push-cic-notify: - extends: - - .py_build_push - - .cic_notify_variables - rules: - - if: $CI_COMMIT_BRANCH == "master" - changes: - - apps/cic-notify/**/* - when: always - - diff --git a/apps/cic-ussd/.gitlab-ci.yml b/apps/cic-ussd/.gitlab-ci.yml index e028dc6c..b81ae95a 100644 --- a/apps/cic-ussd/.gitlab-ci.yml +++ b/apps/cic-ussd/.gitlab-ci.yml @@ -1,30 +1,30 @@ .cic_ussd_variables: variables: APP_NAME: cic-ussd - DOCKERFILE_PATH: docker/Dockerfile_ci - CONTEXT: apps/$APP_NAME -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 + #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 test-mr-cic-ussd: stage: test + tags: + - integration extends: - .cic_ussd_variables cache: - key: - files: - - test_requirements.txt + key: + files: + - test_requirements.txt paths: - /root/.cache/pip - image: $MR_IMAGE_TAG + image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/$APP_NAME:$MR_IMAGE_TAG script: - cd apps/$APP_NAME/ - > @@ -32,21 +32,10 @@ test-mr-cic-ussd: --extra-index-url https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple -r test_requirements.txt - export PYTHONPATH=. && pytest -x --cov=cic_ussd --cov-fail-under=90 --cov-report term-missing tests/cic_ussd - needs: ["build-mr-cic-ussd"] + allow_failure: true + needs: ["build-merge-request"] rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" changes: - apps/$APP_NAME/**/* when: always - -build-push-cic-ussd: - extends: - - .py_build_push - - .cic_ussd_variables - rules: - - if: $CI_COMMIT_BRANCH == "master" - changes: - - apps/cic-ussd/**/* - when: always - -