2 envlist = lint,jsonnet-{check,lint,fix},promql-query-{test,lint},alerts-check
5 [testenv:jsonnet-bundler-{install,update}]
9 install
: Install the jsonnet dependencies
10 update
: Update the jsonnet dependencies
15 [testenv:jsonnet-{check,fix,lint}]
24 check
: Ensure that auto
-generated files matches the current version
25 fix
: Update generated files from jsonnet file with latest changes
26 lint
: Test if jsonnet files are linted
(without any update
)
28 -rrequirements
-grafonnet.txt
29 depends = jsonnet-bundler-install
31 check
: sh test
-jsonnet.sh
32 lint
: .
/lint
-jsonnet.sh
--test
33 fix
: jsonnet
-J vendor
-m dashboards_out dashboards.jsonnet
39 -rrequirements
-lint.txt
42 pylint --rcfile=.pylintrc tests_dashboards
44 isort tests_dashboards
46 [testenv:promql-query-test]
48 lint
: Run promtool check on grafana queries
49 test
: Run promtool unit testing on grafana queries.
51 -rrequirements
-lint.txt
52 depends = grafonnet-check
57 behave tests_dashboards
/features
59 [testenv:alerts-{fix,check,lint}]
61 -rrequirements
-alerts.txt
63 depends = grafonnet-check
67 fix
: jsonnet
-J vendor
-S alerts.jsonnet
-o prometheus_alerts.yml
68 lint
: promtool check rules prometheus_alerts.yml
69 test
: pytest
-rA tests_alerts
/test_syntax.py tests_alerts
/test_unittests.py
70 python3 .
/tests_alerts
/validate_rules.py