-
Notifications
You must be signed in to change notification settings - Fork 5
/
.gitlab-ci.yml
32 lines (30 loc) · 960 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
stages:
- test
- export
test_module:
stage: test
image: python:3.8-slim
script:
- pip install -r requirements-dev.txt
- flake8 src/
- pip install -r requirements.txt
- pip install .
- pytest -m commit --cov=retypd --cov-config=.coveragerc test/
tags:
- shared
rules:
- if: '$CI_COMMIT_BRANCH || $CI_MERGE_REQUEST_REF_PATH'
export_module:
stage: export
image: python:3.8-slim
script:
- pip install -r requirements-dev.txt
- python3 setup.py bdist_wheel --dist-dir=$CI_PROJECT_DIR/dist
- ls $CI_PROJECT_DIR/dist/*.whl | xargs $CI_PROJECT_DIR/delete_remote_packages.py $GL_PKG_API_TOKEN
- sed "s/password = <access token>/password = $GL_PKG_API_TOKEN/" $CI_PROJECT_DIR/.pypirc > ~/.pypirc
- python3 -m twine upload --verbose --repository repypi $CI_PROJECT_DIR/dist/*.whl
tags:
- shared
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
- if: '$CI_COMMIT_REF_NAME =~ /^release-.*/'