-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
50 lines (43 loc) · 994 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
image:
name: python:3.8
entrypoint: [""]
services:
- docker:20.10.7-dind
variables:
AWS_DEFAULT_REGION: us-east-1
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
stages:
- build
- test
- deploy
default:
before_script:
- export POETRY_HOME=/opt/poetry
- curl -sSL https://install.python-poetry.org | python3 - --version 1.2.2
- $POETRY_HOME/bin/poetry config virtualenvs.create false
- $POETRY_HOME/bin/poetry install
- make configure_git
# run this manually on main branch
bump-version:
stage: build
script:
- make patch_version_up
when: manual
allow_failure: false
rules:
- if: $CI_COMMIT_BRANCH == "main"
test:
stage: test
script:
- make test
publish-package:
stage: deploy
script:
- $POETRY_HOME/bin/poetry poetry build
# add -r testpypi for testing changes in CI
- $POETRY_HOME/bin/poetry poetry publish
only:
# TODO check that this is a version tag
- tags