.gitlab-ci.yml 691 Bytes
Newer Older
Matthieu Boileau's avatar
v0.2.2    
Matthieu Boileau committed
1
2
3
variables:
  GIT_SUBMODULE_STRATEGY: recursive

4
stages:
Matthieu Boileau's avatar
Matthieu Boileau committed
5
  - deps
6
7
8
  - test
  - deploy

Matthieu Boileau's avatar
Matthieu Boileau committed
9
10
11
12
13
14
15
16
17
18
deps:
  stage: deps
  tags:
    - shell
  script:
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
    - docker info
    - echo "Building $CI_REGISTRY_IMAGE"
    - DOCKER_BUILDKIT=1 docker build --pull -t $CI_REGISTRY_IMAGE -f Dockerfile .
    - docker push $CI_REGISTRY_IMAGE
19

Matthieu Boileau's avatar
Matthieu Boileau committed
20
test:
21
  stage: test
Matthieu Boileau's avatar
Matthieu Boileau committed
22
  image: $CI_REGISTRY_IMAGE
Matthieu Boileau's avatar
Matthieu Boileau committed
23
24
25
  tags:
    - docker
  script:
26
    - poetry install  
27
28
29
30
    - poetry run pytest tests -v

deploy:
  stage: deploy
Matthieu Boileau's avatar
Matthieu Boileau committed
31
  image: $CI_REGISTRY_IMAGE
32
33
34
35
36
37
38
  tags:
    - docker
  script:
    - poetry build
    - poetry publish -u boileau -p $PYPI_PASSWORD
  only:
    - master