gerbonara/.gitlab-ci.yml

65 wiersze
1.5 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
2022-02-06 20:06:23 +00:00
- docs
2022-02-06 19:42:46 +00:00
- publish
2021-05-23 11:42:45 +00:00
2022-02-06 20:06:23 +00:00
build:archlinux:
2022-02-06 19:42:46 +00:00
stage: build
2022-02-06 20:06:23 +00:00
image: "registry.gitlab.com/gerbolyze/build-containers/archlinux:latest"
2022-02-06 19:42:46 +00:00
variables:
GIT_SUBMODULE_STRATEGY: none
2021-05-23 11:42:45 +00:00
script:
2022-02-06 20:09:21 +00:00
- pip3 install --user wheel
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 20:06:23 +00:00
test:archlinux:
2022-02-06 19:42:46 +00:00
stage: test
2022-02-06 20:06:23 +00:00
image: "registry.gitlab.com/gerbolyze/build-containers/archlinux:latest"
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:
2022-02-06 20:06:23 +00:00
- build:archlinux
2022-02-06 19:42:46 +00:00
artifacts:
name: "gerbolyze-$CI_COMMIT_REF_NAME-gerbonara"
when: on_failure
paths:
- gerbonara_test_failures/*
2022-02-06 20:06:23 +00:00
docs:archlinux:
stage: test
image: "registry.gitlab.com/gerbolyze/build-containers/archlinux:latest"
script:
- pip3 install --user sphinx
- ~/.local/bin/sphinx-build -E docs docs/_build
dependencies:
- build:archlinux
artifacts:
name: "docs-gerbonara-$CI_COMMIT_REF_NAME"
paths:
- docs/_build
2022-02-06 19:42:46 +00:00
publish:gerbonara:
stage: publish
variables:
GIT_SUBMODULE_STRATEGY: none
2022-02-06 20:06:23 +00:00
image: "registry.gitlab.com/gerbolyze/build-containers/archlinux:latest"
2022-02-06 19:42:46 +00:00
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:
2022-02-06 20:06:23 +00:00
- build:archlinux
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