From e3b73a633c266da535c7cb43fca77e327ebe3a0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20L=C3=B6fgren?= <victor.l0fgr3n@gmail.com> Date: Tue, 16 Feb 2021 11:47:42 +0100 Subject: [PATCH] #3: Add server test pipline --- .gitignore | 3 ++- .gitlab-ci.yml | 6 ++++++ .gitlab/server.gitlab-ci.yml | 19 +++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .gitlab-ci.yml create mode 100644 .gitlab/server.gitlab-ci.yml diff --git a/.gitignore b/.gitignore index 0d14ca4d..9f28e5cb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ __pycache__ *.db */env -*.coverage \ No newline at end of file +*.coverage +.pytest_cache \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..3711fef4 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,6 @@ +stages: + - setup + - test + +inlclude: + - local: .gitlab/server.gitlab-ci.yml diff --git a/.gitlab/server.gitlab-ci.yml b/.gitlab/server.gitlab-ci.yml new file mode 100644 index 00000000..1c47b3cb --- /dev/null +++ b/.gitlab/server.gitlab-ci.yml @@ -0,0 +1,19 @@ +image: python + +cache: + paths: + - server/venv/ + +before_script: + - python --version + - pip install virtualenv + - cd server/ + - python -m venv env + - source env/bin/activate + +server-test: + stage: test + script: + - cd server + - source env/bin/activate + - pytest --cov app tests/ -- GitLab