summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: 6dd8464b3db570b47070193593ec7398bcb3c309 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
variables:
  GIT_SUBMODULE_STRATEGY: recursive

stages:
  - build
  - test
  - publish

build:debian_10:
  stage: build
  image: "registry.gitlab.com/gerbolyze/build-containers/debian:10"
  variables:
    GIT_SUBMODULE_STRATEGY: none
  script:
    - python3 setup.py bdist_wheel
  artifacts:
    name: "gerbolyze-$CI_COMMIT_REF_NAME-gerbonara"
    paths:
      - dist/*.whl

test:debian_10:
  stage: test
  image: "registry.gitlab.com/gerbolyze/build-containers/debian:10"
  script:
    - pip3 install --user pytest
    - ~/.local/bin/pytest -o 'testpaths=gerbonara/tests' -o 'norecursedirs=*'
  dependencies:
    - build:debian_10
  artifacts:
    name: "gerbolyze-$CI_COMMIT_REF_NAME-gerbonara"
    when: on_failure
    paths:
      - gerbonara_test_failures/*

publish:gerbonara:
  stage: publish
  variables:
    GIT_SUBMODULE_STRATEGY: none
  image: "registry.gitlab.com/gerbolyze/build-containers/debian:10"
  cache: {}
  script:
    - pip install -U --user twine
    - export TWINE_USERNAME TWINE_PASSWORD
    - ~/.local/bin/twine upload dist/*
  dependencies:
    - build:debian_10
  only:
    - /^v.*$/