.gitlab-ci.yml 1.18 KB
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-parsers
Raul Sirel's avatar
Raul Sirel committed
11
  - test-tagger
Raul Sirel's avatar
Raul Sirel committed
12
  - test-toolkit
Raul Sirel's avatar
Raul Sirel committed
13

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

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

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
43
    - sh ./worker/docker/build_and_push.sh
Raul Sirel's avatar
Raul Sirel committed
44
45
46
    - docker system prune --volumes -f
  only:
    - tags
Raul Sirel's avatar
Raul Sirel committed
47
48
49
50
51
52
53
54
55

TestParsers:
  stage: test-parsers
  trigger:
    project: texta/texta-parsers
    strategy: depend
  only:
    - tags

Raul Sirel's avatar
Raul Sirel committed
56
57
58
59
60
61
62
63
TestTagger:
  stage: test-tagger
  trigger:
    project: texta/texta-tagger-python
    strategy: depend
  only:
    - tags

Raul Sirel's avatar
Raul Sirel committed
64
65
66
67
68
69
70
TestToolkit:
  stage: test-toolkit
  trigger:
    project: texta/texta-rest
    strategy: depend
  only:
    - tags