-
Notifications
You must be signed in to change notification settings - Fork 1
/
Taskfile.yml
61 lines (50 loc) · 1.24 KB
/
Taskfile.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
57
58
59
60
61
version: "3"
vars:
RUNNER:
sh: 'echo {{ .RUNNER | default "uv run " }}'
SOURCES: .
SOURCES_ROOT: .
tasks:
default:
cmd:
task: all
lint:
desc: Lint python source files
cmds:
- "{{.RUNNER}} ruff check {{.SOURCES}}"
- "{{.RUNNER}} ruff format --check --diff {{.SOURCES}}"
format:
desc: Format python source files
aliases: ["fmt"]
cmds:
- "{{.RUNNER}} ruff format {{ .SOURCES }}"
- "{{.RUNNER}} ruff check --fix {{.SOURCES}}"
deptry:
desc: Check used dependencies with deptry
cmd: "{{.RUNNER}} deptry {{.SOURCES_ROOT}}"
typecheck:
desc: Perform type-checking
cmd: "{{.RUNNER}} mypy {{.SOURCES}}"
test:
desc: Run tests
cmd: "{{.RUNNER}} pytest -n auto"
testcov:
desc: Run tests and generate a coverage report
cmds:
- "{{.RUNNER}} coverage run"
- "{{.RUNNER}} coverage report -m"
- "{{.RUNNER}} coverage xml"
libpass:
vars:
SOURCES: libpass tests/libpass
cmds:
- task: format
- "{{.RUNNER}} mypy {{.SOURCES}}"
- "{{.RUNNER}} pytest tests/libpass"
all:
desc: Run the standard set of checks performed in CI
cmds:
- task: format
- task: deptry
- task: typecheck
- task: test