transip-client/.gitlab-ci.yml
2023-06-25 11:27:21 +02:00

55 lines
999 B
YAML

stages:
- build
- test
- release
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- .venv/
- .cache/pip
- .cache/poetry
development-build:
stage: build
image: python:3.11
script:
- make install-development
- transip-listen --help
only:
- development
production-build:
stage: build
image: python:3.11
script:
- make install-production
- transip-listen --help
only:
- main
tests:
stage: test
coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
image: python:3.11
before_script:
- pip install -r requirements/ci.txt
script:
- coverage run --module unittest
- coverage report
release:
stage: release
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG
script:
- echo 'running release job'
release:
name: 'Release $CI_COMMIT_TAG'
description: './CHANGELOG.md'
tag_name: '$CI_COMMIT_TAG'
ref: '$CI_COMMIT_TAG'