-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathTaskfile.yml
More file actions
55 lines (48 loc) · 1.59 KB
/
Taskfile.yml
File metadata and controls
55 lines (48 loc) · 1.59 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
version: '3'
tasks:
clean:
desc: clean up
cmds:
- find . -type d -name .pytest_cache -exec rm -rf {} \; || true
- find . -type d -name __pycache__ -exec rm -rf {} \; || true
- find . -type d -name .ten -exec rm -rf {} \; || true
- find . -name .coverage -exec rm -f {} \; || true
install:
desc: install dependencies
cmds:
- tman install --standalone
- pip install -r requirements.txt
- pip install -r tests/requirements.txt
lint:
desc: lint codes
env:
PYTHONPATH: "{{.USER_WORKING_DIR}}/.ten/app:{{.USER_WORKING_DIR}}/.ten/app/ten_packages/system/ten_runtime_python/lib:{{.USER_WORKING_DIR}}/.ten/app/ten_packages/system/ten_runtime_python/interface"
cmds:
- pylint ./interface/ten_ai_base/*.py {{ .CLI_ARGS }}
test:
desc: run tests
cmds:
- task: test-standalone
- task: test-integration
test-standalone:
desc: run standalone tests
cmds:
- ./tests/bin/start {{ .CLI_ARGS }}
test-integration:
desc: run integration tests
vars:
EXTENSIONS:
sh: 'find integration_tests -type d -exec test -d "{}/tests" \; -print'
cmds:
- for: { var: EXTENSIONS }
task: test-extension
vars:
EXTENSION: '{{ .ITEM }}'
test-extension:
desc: run standalone testing of one single extension
vars:
EXTENSION: '{{.EXTENSION| default "test_config_python"}}'
env:
PYTHONPATH: "{{.USER_WORKING_DIR}}/interface:{{.USER_WORKING_DIR}}"
cmds:
- cd {{.EXTENSION}} && tman -y install --standalone && ./tests/bin/start {{ .CLI_ARGS }}