FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 7dfe7118 authored by L. Bower's avatar L. Bower
Browse files

adding CI support for git

parent 001a5884
No related branches found
No related tags found
No related merge requests found
# This file is a template, and might need editing before it works on your project.
# Official language image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/python/tags/
image: lb584/ews_coordinator:latest
# 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"
PACKAGES_DIR: "$CI_PROJECT_DIR/packages/"
# 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:
- python3 -V # Print out python version for debugging
# - apt-get install --assume-yes git
- echo $PACKAGES_DIR
- mkdir $PACKAGES_DIR
- git clone "https://nouser:$ENV_SUIT_V2_ACCESS@gitlab.developers.cam.ac.uk/gilligan-epid/wheat-rusts/ews_environmental_suitability_v2.git" $PACKAGES_DIR/met_extractor_v2
- ls $PACKAGES_DIR
- source /storage/app/miniconda3/bin/activate /storage/app/EWS_prod/envs/conda/py3EWS/
- pwd
- export PYTHONPATH="$PYTHONPATH:./met_data_extraction:./tests:$PACKAGES_DIR/met_extractor_v2/environmental_suitability"
test:
script:
- echo $PYTHONPATH
- python3 -m unittest tests/unit/coordinator/example_test.py
import unittest
class ExampleTest(unittest.TestCase):
def setUp(self) -> None:
super().setUp()
def test_v1_dewperiod_expected_results1(self):
self.assertTrue(True)
if __name__ == '__main__':
print("hello")
unittest.main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment