From 18de98840b6da0f7b11e81fd65bf93406d58ea0d Mon Sep 17 00:00:00 2001 From: Martin Reinecke <martin@mpa-garching.mpg.de> Date: Mon, 24 Feb 2020 11:27:05 +0100 Subject: [PATCH] add basic CI capabilities --- .gitlab-ci.yml | 24 ++++++++++++++++++++++++ Dockerfile | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 Dockerfile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..ae0da66 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,24 @@ +image: $CONTAINER_TEST_IMAGE + +variables: + CONTAINER_TEST_IMAGE: gitlab-registry.mpcdf.mpg.de/$CI_PROJECT_PATH:$CI_BUILD_REF_NAME + OMP_NUM_THREADS: 2 + +stages: + - build_docker + - testing + +build_docker: + image: docker:stable + stage: build_docker + script: + - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN gitlab-registry.mpcdf.mpg.de + - docker build -t $CONTAINER_TEST_IMAGE . + - docker push $CONTAINER_TEST_IMAGE + +test_suite: + stage: testing + script: + - cd pypocketfft + - pip3 install --user . + - pytest-3 -q test.py diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b4739e0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,2 @@ +FROM debian:testing-slim +RUN apt-get update && apt-get install -y git python3-pip python3-pytest && rm -rf /var/lib/apt/lists/* -- GitLab