gerbonara/.gitlab-ci.yml

124 wiersze
3.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
2022-06-21 07:54:52 +00:00
- 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-06-10 20:29:15 +00:00
- git config --global --add safe.directory "$CI_PROJECT_DIR"
2022-02-06 20:09:21 +00:00
- pip3 install --user wheel
2022-06-12 19:37:31 +00:00
- python3 setup.py sdist bdist_wheel
2022-02-06 19:42:46 +00:00
artifacts:
name: "gerbolyze-$CI_COMMIT_REF_NAME-gerbonara"
paths:
2022-06-12 19:37:31 +00:00
- dist/*
2021-05-23 11:42:45 +00:00
2022-06-21 07:54:52 +00:00
test:archlinux:
stage: test
image: "registry.gitlab.com/gerbolyze/build-containers/archlinux:latest"
script:
- pytest -o 'testpaths=gerbonara/tests' -o 'norecursedirs=*'
dependencies:
- build:archlinux
cache:
key: test-image-cache
paths:
- gerbonara/tests/image_cache/*.svg
- gerbonara/tests/image_cache/*.png
artifacts:
name: "gerbolyze-$CI_COMMIT_REF_NAME-gerbonara"
when: on_failure
paths:
- gerbonara_test_failures/*
2022-06-21 09:21:50 +00:00
test:ubuntu2204:
2022-06-21 08:03:53 +00:00
stage: test
image: "registry.gitlab.com/gerbolyze/build-containers/ubuntu:22.04"
script:
- python3 -m pip install pytest beautifulsoup4 pillow numpy slugify lxml click scipy
2022-06-21 08:12:57 +00:00
- python3 -m pytest -o 'testpaths=gerbonara/tests' -o 'norecursedirs=*'
2022-06-21 08:03:53 +00:00
dependencies:
- build:archlinux
cache:
key: test-image-cache
paths:
- gerbonara/tests/image_cache/*.svg
- gerbonara/tests/image_cache/*.png
artifacts:
name: "gerbolyze-$CI_COMMIT_REF_NAME-gerbonara"
when: on_failure
paths:
- gerbonara_test_failures/*
test:ubuntu2004:
stage: test
image: "registry.gitlab.com/gerbolyze/build-containers/ubuntu:20.04"
script:
- python3 -m pip install pytest beautifulsoup4 pillow numpy slugify lxml click scipy
- python3 -m pytest -o 'testpaths=gerbonara/tests' -o 'norecursedirs=*'
dependencies:
- build:archlinux
cache:
key: test-image-cache
paths:
- gerbonara/tests/image_cache/*.svg
- gerbonara/tests/image_cache/*.png
artifacts:
name: "gerbolyze-$CI_COMMIT_REF_NAME-gerbonara"
when: on_failure
paths:
- gerbonara_test_failures/*
2022-06-21 08:03:53 +00:00
2022-06-21 07:54:52 +00:00
docs:archlinux:
stage: test
image: "registry.gitlab.com/gerbolyze/build-containers/archlinux:latest"
script:
- git config --global --add safe.directory "$CI_PROJECT_DIR"
2022-06-21 07:54:52 +00:00
- sphinx-build -E docs docs/_build
dependencies:
- build:archlinux
artifacts:
name: "docs-gerbonara-$CI_COMMIT_REF_NAME"
paths:
- docs/_build
2022-02-06 20:06:23 +00:00
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
- export TWINE_USERNAME TWINE_PASSWORD
2022-02-06 21:33:19 +00:00
- twine upload dist/*
2022-02-06 19:42:46 +00:00
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
2022-02-06 20:17:57 +00:00
pages:
stage: publish
variables:
GIT_SUBMODULE_STRATEGY: none
image: "registry.gitlab.com/gerbolyze/build-containers/archlinux:latest"
script:
- git config --global --add safe.directory "$CI_PROJECT_DIR"
2022-02-06 22:54:28 +00:00
- sphinx-build -E docs public
2022-02-06 20:17:57 +00:00
dependencies:
- build:archlinux
artifacts:
paths:
2022-02-06 22:54:28 +00:00
- public
2022-02-06 20:17:57 +00:00
only:
- /^v.*$/