gerbonara/.gitlab-ci.yml

50 wiersze
1.1 KiB
YAML
Czysty Zwykły widok Historia

2021-05-23 11:42:45 +00:00
variables:
2022-02-06 19:42:46 +00:00
GIT_SUBMODULE_STRATEGY: recursive
2021-05-23 11:42:45 +00:00
2022-02-06 19:42:46 +00:00
stages:
- build
- test
- publish
2021-05-23 11:42:45 +00:00
2022-02-06 19:42:46 +00:00
build:debian_10:
stage: build
image: "registry.gitlab.com/gerbolyze/build-containers/debian:10"
variables:
GIT_SUBMODULE_STRATEGY: none
2021-05-23 11:42:45 +00:00
script:
2022-02-06 19:42:46 +00:00
- python3 setup.py bdist_wheel
artifacts:
name: "gerbolyze-$CI_COMMIT_REF_NAME-gerbonara"
paths:
- dist/*.whl
2021-05-23 11:42:45 +00:00
2022-02-06 19:42:46 +00:00
test:debian_10:
stage: test
image: "registry.gitlab.com/gerbolyze/build-containers/debian:10"
2021-05-23 11:42:45 +00:00
script:
2022-02-06 19:57:34 +00:00
- pip3 install --user pytest
- ~/.local/bin/pytest -o 'testpaths=gerbonara/tests' -o 'norecursedirs=*'
2022-02-06 19:42:46 +00:00
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: {}
2021-05-23 11:42:45 +00:00
script:
2022-02-06 19:42:46 +00:00
- pip install -U --user twine
- export TWINE_USERNAME TWINE_PASSWORD
- ~/.local/bin/twine upload dist/*
dependencies:
- build:debian_10
2021-05-23 11:42:45 +00:00
only:
2022-02-06 19:42:46 +00:00
- /^v.*$/
2021-05-23 11:42:45 +00:00