From 275d6ddcf82fc2bba9ef4f7c5714e6fdb6c082cd Mon Sep 17 00:00:00 2001 From: Paul Weidner Date: Thu, 19 Dec 2019 12:49:10 -0800 Subject: [PATCH 1/2] Add .gitlab-ci.yml configuration --- .gitlab-ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..7ec30be --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,16 @@ +image: python: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" + +before_script: + - python -V # Print out python version for debugging + - pip install virtualenv + - virtualenv venv + - source venv/bin/activate + +test: + script: + - python setup.py test From 34700df90c9637706fe7ba127159fe2553061a74 Mon Sep 17 00:00:00 2001 From: Paul Weidner Date: Thu, 19 Dec 2019 12:56:12 -0800 Subject: [PATCH 2/2] Add job for testing pull requests --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7ec30be..799e7e4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,3 +14,9 @@ before_script: test: script: - python setup.py test + +test-pull-requests: + script: + - python setup.py test + only: + - external_pull_requests