forked from adimian/redis-log-handler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
45 lines (37 loc) · 852 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
image: python:latest
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
REDIS_HOST: redis
cache:
paths:
- .cache/pip
- venv/
stages:
- test
- upload
before_script:
- python -V # Print out python version for debugging
- python3 -m venv venv
- source venv/bin/activate
pytest:
stage: test
services:
- redis:4
script:
- pip install pytest pytest-cov
- pip install -e .
- pytest -s tests --cov redis_log_handler --cov-report term-missing --tb=native
security:
stage: test
script:
- pip install safety
- pip install -e .
- safety check
pypi:
stage: upload
script:
- pip install twine wheel
- python setup.py sdist bdist_wheel
- twine upload dist/*