Skip to content
Snippets Groups Projects
.gitlab-ci.yml 607 B
Newer Older
plup's avatar
plup committed
---
image: python:3.6
plup's avatar
plup committed

stages:
plup's avatar
plup committed
  - test
  - release
plup's avatar
plup committed

plup's avatar
plup committed
test:
  stage: test
plup's avatar
plup committed
  script:
    - pip install .[dev]
    - python -m unittest djangoldp.tests.runner
plup's avatar
plup committed
  except:
    - master
plup's avatar
plup committed
    - tags
plup's avatar
plup committed
  tags:
    - test
plup's avatar
plup committed

publish:
  stage: release
  before_script:
    - pip install python-semantic-release sib-commit-parser
plup's avatar
plup committed
    - git config user.name "${GITLAB_USER_NAME}"
    - git config user.email "${GITLAB_USER_EMAIL}"
plup's avatar
plup committed
    - git remote set-url origin "https://gitlab-ci-token:${GL_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
plup's avatar
plup committed
  script:
    - semantic-release publish
  only:
    - master
plup's avatar
plup committed
  tags:
    - deploy