-
Notifications
You must be signed in to change notification settings - Fork 85
/
Taskfile.yaml
55 lines (48 loc) · 1.18 KB
/
Taskfile.yaml
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:
default:
- task: init
- task: fmt
- task: lint
- task: test
- task: test-mp
init:
desc: Init environment.
cmds:
- poetry install
- pre-commit install --install-hooks
- pre-commit install --install-hooks --hook-type commit-msg
update:
desc: Update environment.
cmds:
- poetry update
- pre-commit autoupdate
fmt:
desc: Run formatters.
cmds:
- poetry run black .
- poetry run isort .
- pre-commit run -a prettier
lint:
desc: Run linters.
cmds:
- poetry run flake8 --config .flake8
- poetry run dmypy run --timeout 3600 src
test:
desc: Run tests.
cmds:
- poetry run pytest {{ .COVERAGE }}
vars:
COVERAGE: |-
--cov-report=term-missing --cov-report=xml --cov=src
test-mp:
desc: Run multi process tests.
cmds:
- rm -rf $PROMETHEUS_MULTIPROC_DIR
- mkdir -p $PROMETHEUS_MULTIPROC_DIR
- poetry run pytest -k test_multiproc {{ .COVERAGE }}
vars:
COVERAGE: |-
--cov-append --cov-report=term-missing --cov-report=xml --cov=src
env:
PROMETHEUS_MULTIPROC_DIR: /tmp/pfi-tests/multiproc