Commit 61f253e8 authored by Ruben ten Hove's avatar Ruben ten Hove
Browse files

Merge branch '64-feat-isort-check-job' into 'master'

feat: isort check job

Closes #64

See merge request ci/templates!36
parents 74da6b6e f704b6de
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ include:

  - local: "python/bandit.yml"
  - local: "python/black.yml"
  - local: "python/isort.yml"
  - local: "python/pip-outdated.yml"
  - local: "python/pytest.yml"
  - local: "python/mypy.yml"

python/isort.yml

0 → 100644
+16 −0
Original line number Diff line number Diff line
---
# isort sorts your imports
# this job will check if your imports follow
# isort profile=black format, for black compatibility
# https://github.com/PyCQA/isort

python:isort:
  stage: test
  image: registry.gitlab.com/notno/python-tests
  variables:
    CHECK_PATH: "./${PYTHON_PACKAGE}"
    EXCLUDE: ""  # Files/dirs to ignore. For Django use /migrations/
  script:
    - pip show isort
    - isort --check --profile=black --diff --color ${CHECK_PATH} --skip=${EXCLUDE}  # yamllint disable-line rule:line-length
  needs: []