forked from Checkmk/checkmk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
56 lines (56 loc) · 1.9 KB
/
.travis.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
51
52
53
54
55
56
# This is a simple entry point to execute the basic and most important Python
# tests for Checkmk. We run tools like pylint, yapf and our py.test based unit
# tests here. Some tests, like integration tests or tests of very specific
# components are not executed.
#
# We focus on the tests that are needed by external developers, e.g. to support
# check plugin development.
---
language: python
matrix:
include:
# Execute all these targets in parallel
- name: "Bandit tests"
python: "3.8"
env: TEST_TARGETS="test-bandit"
- name: "Python formatting"
python: "3.8"
env: TEST_TARGETS="test-format-python"
- name: "Pylint tests"
python: "3.8"
env: TEST_TARGETS="test-pylint"
- name: "Python unit tests"
python: "3.8"
env: TEST_TARGETS="test-unit"
- name: "mypy tests"
python: "3.8"
env: TEST_TARGETS="test-mypy-raw"
env:
global:
# Optimize builds by caching pip and pipenv things
- PIP_CACHE_DIR=$HOME/.cache/pip
- PIPENV_CACHE_DIR=$HOME/.cache/pipenv
# Don't use travis venv, build our own
- PIPENV_IGNORE_VIRTUALENVS=1
# Disable some annoying warnings
- PYTHONWARNINGS=ignore::DeprecationWarning
cache:
directories:
- $PIP_CACHE_DIR
- $PIPENV_CACHE_DIR
addons:
apt:
packages:
# Needed for some "unit test" (test_mk_errpt_aix).
- ksh
# Needed for building rrdtool python bindings
- librrd-dev
install:
- pip install pipenv
- make .venv
script:
# TODO: Some tests could be optimized for better execution time. For
# example test-format-python optionally checks only the files in set in
# the environment variable PYTHON_FILES. Without it, it always checks
# all known python files.
- travis_wait 30 make -C tests $TEST_TARGETS;