summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml110
1 files changed, 39 insertions, 71 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d6dce87..a92cca7 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,80 +1,48 @@
-stages:
- - test
- - coverage
- - build
- - upload
-
-image: python:3-alpine
-
variables:
- TWINE_NON_INTERACTIVE: "true"
- CONFIG_FILE: ".pypirc"
-
-cache:
- paths:
- - .pipcache/
-
-before_script:
- - apk --no-cache add make
- - pip --cache-dir .pipcache install -r test-requirements.txt
- - cat /etc/alpine-release
- - python -V
-
-.test:
- stage: test
- script:
- - make test
-
-test:3.6:
- extends: .test
- image: python:3.6-alpine
-
-test:3.7:
- extends: .test
- image: python:3.7-alpine
+ GIT_SUBMODULE_STRATEGY: recursive
-test:3.8:
- extends: .test
- image: python:3.8-alpine
-
-test:3.9:
- extends: .test
- image: python:3.9-alpine
-
-# 3.10
-test:rc:
- extends: .test
- allow_failure: true
- image: python:rc-alpine
+stages:
+ - build
+ - test
+ - publish
-testpypi:
- stage: upload
+build:debian_10:
+ stage: build
+ image: "registry.gitlab.com/gerbolyze/build-containers/debian:10"
+ variables:
+ GIT_SUBMODULE_STRATEGY: none
script:
- - pip --cache-dir .pipcache install twine
- - python setup.py sdist bdist_wheel
- - twine upload --skip-existing --repository testpypi dist/*
- only:
- - master
+ - python3 setup.py bdist_wheel
+ artifacts:
+ name: "gerbolyze-$CI_COMMIT_REF_NAME-gerbonara"
+ paths:
+ - dist/*.whl
-pypi:
- stage: upload
+test:debian_10:
+ stage: test
+ image: "registry.gitlab.com/gerbolyze/build-containers/debian:10"
script:
- - pip --cache-dir .pipcache install twine
- - python setup.py sdist bdist_wheel
- - twine upload --skip-existing --repository pypi dist/*
- only:
- - tags
-
-aur_git:
- stage: upload
+ - "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:
- - echo "build pygerber-git"
+ - pip install -U --user twine
+ - export TWINE_USERNAME TWINE_PASSWORD
+ - ~/.local/bin/twine upload dist/*
+ dependencies:
+ - build:debian_10
only:
- - master
+ - /^v.*$/
-aur:
- stage: upload
- script:
- - echo "build pygerber"
- only:
- - tags