diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..2562c11 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,20 @@ +stages: + - lint + - test + +# TODO: deploy runners for this project. +run-tests: + stage: test + image: fedora:latest + services: + - postgres:latest + variables: + POSTGRES_HOST_AUTH_METHOD: trust + before_script: + - dnf install -y python3-devel python3-pip libpq-devel openldap-devel gcc + script: + - cd uncloud + - pip install -r requirements.txt + - cp uncloud/secrets_sample.py uncloud/secrets.py + - coverage run --source='.' ./manage.py test + - coverage report diff --git a/uncloud/requirements.txt b/uncloud/requirements.txt index cfbbcd4..b78abf5 100644 --- a/uncloud/requirements.txt +++ b/uncloud/requirements.txt @@ -5,3 +5,4 @@ stripe xmltodict psycopg2 parsedatetime +coverage