Skip to content
.gitlab-ci.yml 1.4 KiB
Newer Older
variables:
  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
  GIT_STRATEGY: clone

cache:
  paths:
    - .cache/pip

stages:
  - lint
  - test
  - doc
  - build
.except-default: &except-default
  except:
    - tags

.python_version:
  <<: *except-default
  image: python:3.7
  before_script:
    - python -m pip install --upgrade pip
    - python -m pip install --upgrade -r requirements-dev.txt
    - python -m pip install -e .
lint:
  stage: lint
  extends: .python_version
    - ./tools/pyflakes.sh
lint strict:
  stage: lint
  extends: .python_version
    - ./tools/pyflakes-strict.sh
  extends: .python_version
  stage: lint
    - pip install bandit
    - bandit -r woob
    - bandit -r modules
    - bandit -r contrib

check modules:
  stage: test
  extends: .python_version
  script:
    - .ci/check_modules.sh

test:
  stage: test
  extends: .python_version
  script:
    - ./tools/run_tests.sh --no-modules
    - coverage xml -o coverage.xml -i
  artifacts:
    reports:
      coverage_report:
        coverage_format: cobertura
        path: coverage.xml
doc:
  stage: doc
  extends: .python_version
    - make docs
build:
  stage: build
  extends: .python_version
  script:
    - pip install build twine
    - python -m build
    - twine check dist/*.whl

local install:
  stage: build
  extends: .python_version
    - ./tools/local_install.sh --local-modules ~/bin