From ae5eca76933eb7ad424c2d12eda67424392938aa Mon Sep 17 00:00:00 2001 From: Andreas Balogh Date: Tue, 9 Feb 2021 23:09:17 +0100 Subject: [PATCH] updated gitlab-ci --- .gitlab-ci.yml | 63 +++++++++++++++++++++++++++++++++------------ src/zeo/__init__.py | 0 2 files changed, 47 insertions(+), 16 deletions(-) delete mode 100644 src/zeo/__init__.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f41f954..9eb3d6d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,23 +1,54 @@ stages: + - build - test - - package + - deploy + +# Change pip's cache directory to be inside the project directory since we can +# only cache local items. +variables: + PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" + +# Pip's cache doesn't store the python packages +# https://pip.pypa.io/en/stable/reference/pip_install/#caching +# +# If you want to also cache the installed packages, you have to install +# them in a virtualenv and cache it as well. +cache: + paths: + - .cache/pip + - venv/ before_script: - - pip install -r requirements.txt + - python38 -V # Print out python version for debugging + - pip install virtualenv + - virtualenv venv + - source venv/bin/activate -test_scraper: +build_zeo: + stage: build + tags: + - shell + script: + - docker build -t zeo:5.2.0 src/zeo + +build_flask: + stage: build + tags: + - shell + script: + - docker build -t webui:1.0 src/webui + +build_api: + stage: build + tags: + - shell + script: + - echo "Build api image" + +tests: stage: test tags: - - python - script: - - cd src - - python3.7 -m scraper - - -build_package: - stage: package - tags: - - python - script: - - cd src - - python3.7 setup.py \ No newline at end of file + - docker + image: webui:1.0 + services: + - zeo:5.2.0 diff --git a/src/zeo/__init__.py b/src/zeo/__init__.py deleted file mode 100644 index e69de29..0000000