EOX GitLab Instance

.gitlab-ci.yml 523 Bytes
Newer Older
1
2
3
4
stages:
  - test
  - publish

Fabian Schindler's avatar
Fabian Schindler committed
5
image: python:3.8-slim
Fabian Schindler's avatar
Fabian Schindler committed
6

Fabian Schindler's avatar
Fabian Schindler committed
7
8
9
variables:
  REDIS_HOST: redis

Fabian Schindler's avatar
Fabian Schindler committed
10
11
12
13
14
15
16
17
before_script:
  - pip install -r requirements_dev.txt
  - pip install .

test:
  services:
    - redis:latest
  script:
Fabian Schindler's avatar
Fabian Schindler committed
18
    - pytest --cov=vsq tests
Fabian Schindler's avatar
Fabian Schindler committed
19
20
21
22
23
24
25
26

publish:
  script:
    - pip install twine
    - python setup.py sdist bdist_wheel
    - TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python -m twine upload --repository-url https://gitlab.eox.at/api/v4/projects/${CI_PROJECT_ID}/packages/pypi dist/*
  only:
    - tags