-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
48 lines (42 loc) · 1.31 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
image: "python:3.7"
before_script:
- python --version
- apt-get update -y && apt-get upgrade -y
- apt-get install -y libpq-dev
- apt-get update && apt-get install -y lsb-release && apt-get clean all
- wget -qO- https://repos.influxdata.com/influxdb.key | apt-key add -
- source /etc/os-release
- echo "deb https://repos.influxdata.com/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/influxdb.list
- apt-get update && apt-get install influxdb
- service influxdb start
- curl -XPOST 'http://localhost:8086/query' --data-urlencode 'q=CREATE DATABASE "telemetry_summary"'
- ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime
- dpkg-reconfigure --frontend noninteractive tzdata
- pip install --upgrade pip
- pip install -r docs/requirements.txt
stages:
- Static Analysis
- Test
# pylint:
# stage: Static Analysis
# allow_failure: true
# script:
# - pylint -d C0301 src/*.py
mypy:
stage: Static Analysis
script:
- pwd
- ls -l
- python -m mypy src/*.py
flake8:
stage: Static Analysis
script:
- flake8 --max-line-length=120 src/*.py
Telemetry_Summary_Tests:
stage: Test
script:
- pwd
- ls -l
- export PYTHONPATH="$PYTHONPATH:."
- python -c "import sys;print(sys.path)"
- python -m pytest --cov-report term-missing --cov=src tests/