-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
50 lines (45 loc) · 1.07 KB
/
.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
variables:
PEP8_CONFIG_FILE: .flake8
stages:
- lint
- test
- deploy
flake8:
stage: lint
image: registry.gitlab.com/pipeline-components/flake8:latest
script:
- flake8 --verbose --config $PEP8_CONFIG_FILE .
installability:
stage: test
image: python:3.8.7-buster
script:
- pip install -r requirements.txt
- pip install .
unittest:
stage: test
image: python:3.8.7-buster
before_script:
- pip install -r requirements.txt
- pip install .
- pip install coverage
script:
- coverage run --source=/usr/local/lib/python3.8/site-packages/nyquist -m unittest discover -v tests/
after_script:
- coverage report
- coverage html
artifacts:
paths:
- $CI_PROJECT_DIR/htmlcov
pypi-deploy:
stage: deploy
image: python:3.8.7-buster
variables:
CRYPTOGRAPHY_DONT_BUILD_RUST: 1
before_script:
- pip install cryptography==3.4.8 -q
- pip install twine==3.4.2 -q
- python3 setup.py sdist
script:
- twine upload -u=__token__ -p=$PYPI_UPLOAD_TOKEN dist/*
rules:
- if: '$CI_COMMIT_TAG =~ /^v\d+.\d+.\d+/'