.gitlab-ci.yml 587 Bytes
Newer Older
Raul Sirel's avatar
Raul Sirel committed
1
image: debian:buster
Raul Sirel's avatar
Raul Sirel committed
2
3

stages:
Raul Sirel's avatar
Raul Sirel committed
4
  - test
Raul Sirel's avatar
Raul Sirel committed
5
6
  - build

Raul Sirel's avatar
Raul Sirel committed
7
8
Test:
  before_script:
Raul Sirel's avatar
Raul Sirel committed
9
10
11
12
13
14
15
16
    - apt-get update && apt-get install python3-lxml python3-pip -y
    - pip3 install -r requirements.txt
  variables:
    PIP_CACHE_DIR: "$CI_PROJECT_DIR/pip-cache"
  cache:
    paths:
      - "$CI_PROJECT_DIR/pip-cache"
    key: "$CI_PROJECT_ID"
Raul Sirel's avatar
Raul Sirel committed
17
  stage: test
Raul Sirel's avatar
Raul Sirel committed
18
19
20
  tags:
    - ci-test
  script:
Raul Sirel's avatar
ci fix    
Raul Sirel committed
21
    - python3 -m pytest -v tests
Raul Sirel's avatar
Raul Sirel committed
22
23

Build:
Raul Sirel's avatar
Raul Sirel committed
24
  before_script:
Raul Sirel's avatar
...    
Raul Sirel committed
25
    - pip install setuptools wheel twine
Raul Sirel's avatar
Raul Sirel committed
26
27
28
29
30
31
  stage: build
  tags:
    - ci-test
  script:
    - python setup.py sdist
    - twine upload dist/*
Raul Sirel's avatar
Raul Sirel committed
32
33
  only:
    - tags