From 865a4dffd14e124a11c7e7f02b094ba14cb19b3e Mon Sep 17 00:00:00 2001 From: Maxime Alves LIRMM Date: Thu, 2 Sep 2021 10:38:19 +0200 Subject: [PATCH] [ci] add continuous integration Squashed commit of the following: commit e7b303310f3726c4ec5b36db668f7a5aaee29287 Author: Maxime Alves LIRMM Date: Thu Sep 2 10:35:16 2021 +0200 fix gitlab-ci run commit 360c03371f1b088ce883646799f829a50f7a04a8 Author: Maxime Alves LIRMM Date: Thu Sep 2 08:26:51 2021 +0000 Update .gitlab-ci.yml file --- .gitlab-ci.yml | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..13b4837 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,41 @@ +# This file is a template, and might need editing before it works on your project. +# To contribute improvements to CI/CD templates, please follow the Development guide at: +# https://docs.gitlab.com/ee/development/cicd/templates.html +# This specific template is located at: +# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml + +# Official language image. Look for the different tagged releases at: +# https://hub.docker.com/r/library/python/tags/ +image: python:3.8 + +# 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: + - python -V # Print out python version for debugging + - pip install pipenv + - pipenv install --dev --skip-lock + +test: + script: + - pipenv run pytest -v + +run: + script: + - pipenv run python -m build --sdist + - pipenv run python -m build --wheel + artifacts: + paths: + - dist/*.whl