From b69df85b9dd6c6bcc326b56c8ade66e3b2f1d5ea Mon Sep 17 00:00:00 2001 From: Anastasios Zouzias Date: Mon, 14 Jun 2021 11:42:58 +0200 Subject: [PATCH] [cicd] gitlab support --- .gitlab-ci.yml | 21 +++++++++++++++++++++ 1 file 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..c7f17b8 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,21 @@ +image: "python:3.8" + + +tests: + tags: + - docker + script: + - | + pip install nbdev jupyter + pip install -e . + nbdev_read_nbs + echo "Check we are starting with clean git checkout" + if [ -n "$(git status -uno -s)" ]; then echo "git status is not clean"; false; fi + echo "Trying to strip out notebooks" + nbdev_clean_nbs + echo "Check that strip out was unnecessary" + git status -s # display the status to see which nbs need cleaning up + if [ -n "$(git status -uno -s)" ]; then echo -e "!!! Detected unstripped out notebooks\n!!!Remember to run nbdev_install_git_hooks"; false; fi + if [ -n "$(nbdev_diff_nbs)" ]; then echo -e "!!! Detected difference between the notebooks and the library"; false; fi + nbdev_test_nbs +