From 08ee196788afe419547ece8ce0ecfa182bfe1c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Sch=C3=A4fer?= <felix@thegcat.net> Date: Sat, 12 Feb 2022 21:00:07 +0100 Subject: [PATCH] Add CI --- .gitlab-ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..b3f9601 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,42 @@ +--- +stages: + - linting +# 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" +cache: + paths: + - .cache + +docformatter: + stage: linting + image: python:3 + before_script: + - pip3 install -U pip docformatter + script: + - docformatter --check -r . + +black: + stage: linting + image: python:3 + before_script: + - pip3 install -U pip black + script: + - black --check . + +isort: + stage: linting + image: python:3 + before_script: + - pip3 install -U pip isort + script: + - isort -c . + +flake8: + stage: linting + image: python:3 + before_script: + - pip3 install -U pip flake8 + script: + - flake8 . -- GitLab