-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
40 lines (36 loc) · 967 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
image: python:3.8
stages:
- tests
- lint
- deploy
run_tests:
before_script:
- mkdir -p /var/run/dbus
- apt-get update -y && apt-get install -y python3-gi network-manager pkg-config build-essential libdbus-glib-1-dev libgirepository1.0-dev dbus
- dbus-uuidgen > /var/lib/dbus/machine-id
- dbus-daemon --config-file=/usr/share/dbus-1/system.conf --print-address
- service network-manager start
- pip install pipenv
- pipenv install --dev
- pipenv run pip install --no-binary gobject PyGObject
stage: tests
script:
- pipenv run pytest -v -s --disable-warnings
lint_code:
before_script:
- pip install flake8
stage: lint
script:
- flake8 --exclude tests
deploy:
stage: deploy
before_script:
- pip install twine
variables:
TWINE_USERNAME: $PYPI_USERNAME
TWINE_PASSWORD: $PYPI_PASSWORD
script:
- python setup.py sdist
- twine upload --skip-existing dist/*
only:
- production