Split gitlab ci jobs
This commit is contained in:
parent
0fa8fd2558
commit
8ae2cf1f8d
4 changed files with 46 additions and 12 deletions
|
|
@ -1,12 +1,17 @@
|
||||||
tests:
|
stages:
|
||||||
stage: test
|
- test
|
||||||
coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
|
- release
|
||||||
image: python:3.7
|
|
||||||
before_script:
|
variables:
|
||||||
- pip install poetry --quiet
|
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
|
||||||
- poetry config cache-dir .cache/poetry
|
|
||||||
- poetry config virtualenvs.in-project true
|
cache:
|
||||||
- poetry install --no-interaction --quiet
|
key: "$CI_COMMIT_REF_SLUG"
|
||||||
script:
|
paths:
|
||||||
- poetry run coverage run --module unittest
|
- .venv/
|
||||||
- poetry run coverage report
|
- .cache/pip
|
||||||
|
- .cache/poetry
|
||||||
|
|
||||||
|
include:
|
||||||
|
- local: '/gitlab-ci/test.yml'
|
||||||
|
- local: '/gitlab-ci/release.yml'
|
||||||
|
|
|
||||||
5
CHANGELOG.md
Normal file
5
CHANGELOG.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Changelog
|
||||||
|
|
||||||
|
## 0.1
|
||||||
|
|
||||||
|
- Initial release
|
||||||
12
gitlab/release.yml
Normal file
12
gitlab/release.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
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'
|
||||||
12
gitlab/test.yml
Normal file
12
gitlab/test.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
tests:
|
||||||
|
stage: test
|
||||||
|
coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
|
||||||
|
image: python:3.7
|
||||||
|
before_script:
|
||||||
|
- pip install poetry --quiet
|
||||||
|
- poetry config cache-dir .cache/poetry
|
||||||
|
- poetry config virtualenvs.in-project true
|
||||||
|
- poetry install --no-interaction --quiet
|
||||||
|
script:
|
||||||
|
- poetry run coverage run --module unittest
|
||||||
|
- poetry run coverage report
|
||||||
Loading…
Add table
Add a link
Reference in a new issue