diff options
| author | Max Wittig <max.wittig95@gmail.com> | 2019-05-09 22:50:37 +0200 |
|---|---|---|
| committer | Max Wittig <max.wittig95@gmail.com> | 2019-05-09 23:06:12 +0200 |
| commit | 724a67211bc83d67deef856800af143f1dbd1e78 (patch) | |
| tree | 332607a638f84cf57ef2167cc9a25d5fa41662d0 /.gitlab-ci.yml | |
| parent | a7305980ef4065a6518951fb166b11eec9003b4d (diff) | |
| download | gitlab-724a67211bc83d67deef856800af143f1dbd1e78.tar.gz | |
chore(ci): use reliable ci systemchore/ci-reliable-system
Diffstat (limited to '.gitlab-ci.yml')
| -rw-r--r-- | .gitlab-ci.yml | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..0b8fa4f --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,96 @@ +image: python:3.7 + +stages: + - lint + - build-test-image + - test + - deploy + +commitlint: + image: node:12 + stage: lint + before_script: + - npm install -g @commitlint/cli @commitlint/config-conventional + - 'echo "module.exports = {extends: [\"@commitlint/config-conventional\"]}" > commitlint.config.js' + script: + - npx commitlint --from=origin/master + except: + - master + +#build_test_image: # Currently hangs forever, because of GitLab Runner infrastructure issues +# stage: build-test-image +# image: +# name: gcr.io/kaniko-project/executor:debug +# entrypoint: [""] +# script: +# - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json +# - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/tools/Dockerfile-test --destination $CI_REGISTRY_IMAGE:test +# only: +# refs: +# - master +# changes: +# - tools/ + +.tox_includes: &tox_includes + stage: test + before_script: + - pip install tox + script: + - tox -e $TOX_ENV + +test_2.7: + <<: *tox_includes + image: python:2.7 + variables: + TOX_ENV: py27 + +test_3.4: + <<: *tox_includes + image: python:3.4 + variables: + TOX_ENV: py34 + +test_3.5: + <<: *tox_includes + image: python:3.5 + variables: + TOX_ENV: py35 + +test_3.6: + <<: *tox_includes + image: python:3.6 + variables: + TOX_ENV: py36 + +test_3.7: + <<: *tox_includes + image: python:3.7 + variables: + TOX_ENV: py37 + +test_3.8: + <<: *tox_includes + image: python:3.8-rc-alpine + variables: + TOX_ENV: py38 + allow_failure: true + +test_docs: + <<: *tox_includes + variables: + TOX_ENV: docs + +deploy: + stage: deploy + script: + - pip install -U setuptools wheel twine + - python setup.py sdist bdist_wheel + # test package + - python3 -m venv test + - . test/bin/activate + - pip install -U dist/python-gitlab*.whl + - gitlab -h + - deactivate + - twine upload --skip-existing -u $TWINE_USERNAME -p $TWINE_PASSWORD dist/* + only: + - tags |
