From 0e4068cea8941ed9417b86999af5f99d0cc34fb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= Date: Mon, 9 Mar 2020 09:07:14 +0100 Subject: [PATCH] Add minimal CI running django tests --- .gitlab-ci.yml | 20 ++++++++++++++++++++ uncloud/requirements.txt | 1 + 2 files changed, 21 insertions(+) create mode 100644 .gitlab-ci.yml 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