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

Raul Sirel's avatar
Raul Sirel committed
3
4
variables:
  TEXTA_MLP_DATA_DIR: /cache
Raul Sirel's avatar
Raul Sirel committed
5

Raul Sirel's avatar
Raul Sirel committed
6
stages:
Raul Sirel's avatar
Raul Sirel committed
7
  - test
Raul Sirel's avatar
Raul Sirel committed
8
  - build
Raul Sirel's avatar
Raul Sirel committed
9
  - build-worker
Raul Sirel's avatar
Raul Sirel committed
10
  - test-downstream
Raul Sirel's avatar
Raul Sirel committed
11

Raul Sirel's avatar
Raul Sirel committed
12
13
Test:
  before_script:
Raul Sirel's avatar
Raul Sirel committed
14
    - apt-get update && apt-get install python3-lxml python3-pip -y
Raul Sirel's avatar
Raul Sirel committed
15
    - pip3 install -r requirements.txt
Raul Sirel's avatar
Raul Sirel committed
16
  stage: test
Raul Sirel's avatar
Raul Sirel committed
17
18
19
  tags:
    - ci-test
  script:
Raul Sirel's avatar
ci fix    
Raul Sirel committed
20
    - python3 -m pytest -v tests
Raul Sirel's avatar
Raul Sirel committed
21
22

Build:
Raul Sirel's avatar
Raul Sirel committed
23
  before_script:
Raul Sirel's avatar
Raul Sirel committed
24
25
    - apt-get update && apt-get install python3-pip -y
    - pip3 install setuptools twine
Raul Sirel's avatar
Raul Sirel committed
26
27
28
29
  stage: build
  tags:
    - ci-test
  script:
Raul Sirel's avatar
Raul Sirel committed
30
    - python3 setup.py sdist
Raul Sirel's avatar
Raul Sirel committed
31
    - twine upload dist/*
Raul Sirel's avatar
Raul Sirel committed
32
33
  only:
    - tags
Raul Sirel's avatar
Raul Sirel committed
34
35
36
37
38
39
40

BuildWorker:
  stage: build-worker
  tags:
    - docker
  script:
    - docker login -u $CI_DEPLOY_USER -p $CI_DEPLOY_PASSWORD docker.texta.ee
Raul Sirel's avatar
Raul Sirel committed
41
    - sh ./worker/docker/build_and_push.sh
Raul Sirel's avatar
Raul Sirel committed
42
43
44
    - docker system prune --volumes -f
  only:
    - tags
Raul Sirel's avatar
Raul Sirel committed
45

Raul Sirel's avatar
Raul Sirel committed
46
47
TestDownstream:
  stage: test-downstream
Raul Sirel's avatar
Raul Sirel committed
48
  trigger:
Raul Sirel's avatar
Raul Sirel committed
49
50
51
52
    project:
     - texta/texta-parsers
     - texta/texta-tagger-python
     - texta/texta-rest
Raul Sirel's avatar
Raul Sirel committed
53
54
55
    strategy: depend
  only:
    - tags