-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathJustfile
More file actions
33 lines (25 loc) · 1.24 KB
/
Justfile
File metadata and controls
33 lines (25 loc) · 1.24 KB
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
cortex_cli := 'poetry run cortex'
pytest := 'PYTHONPATH=. poetry run pytest -rA'
export CORTEX_API_KEY := env('CORTEX_API_KEY')
export CORTEX_BASE_URL := env('CORTEX_BASE_URL', "https://api.getcortexapp.com")
export CORTEX_API_KEY_VIEWER := env('CORTEX_API_KEY_VIEWER')
help:
@just -l
_setup:
@if [ -f .coverage ]; then rm .coverage; fi
# Run all tests
test-all: _setup test-import
{{pytest}} -n auto -m "not setup and not perf" --html=report.html --self-contained-html --cov=cortexapps_cli --cov-append --cov-report term-missing tests
# Run all tests serially - helpful to see if any tests seem to be hanging
_test-all-individual: test-import
{{pytest}} -m "not setup and not perf" --html=report-all-invidual.html --self-contained-html --cov=cortexapps_cli --cov-append --cov-report term-missing tests
# Run import test, a pre-requisite for any tests that rely on test data.
test-import:
{{pytest}} tests/test_import.py --cov=cortexapps_cli --cov-report=
# Run a single test, ie: just test tests/test_catalog.py
test testname:
{{pytest}} -n auto -m "" {{testname}}
# Run performance tests (rate limiting, long-running tests)
test-perf:
@echo "Running performance tests (this may take 60+ seconds)..."
{{pytest}} -v -s -m perf tests/