-
Notifications
You must be signed in to change notification settings - Fork 94
/
Taskfile.yml
119 lines (101 loc) · 2.43 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# https://taskfile.dev
version: "3"
silent: true
includes:
release: ./.github
mongodb:
taskfile: ./.mongodb-cluster-action/Taskfile.yml
dir: .mongodb-cluster-action
optional: true
tasks:
full-test:
desc: Run the tests against all supported versions.
deps:
- task: "mongodb:check"
cmds:
- tox --parallel auto
test:
desc: |
Run the tests with the current version.
deps:
- task: "mongodb:check"
cmds:
- python -m pytest -rs -n auto
bench:
desc: |
Run the benches with the current version.
deps:
- task: "mongodb:check"
cmds:
- python -m pytest --benchmark-enable --benchmark-only
default:
desc: |
Run the tests related to changes with the current version.
deps:
- task: mongodb
cmds:
- python -m pytest -rs --testmon
coverage:
desc: Get the test coverage (xml and html) with the current version.
deps:
- task: "mongodb:check"
cmds:
- coverage run -m pytest -rs
- coverage report -m
- coverage xml
- 'echo "Generated XML report: ./coverage.xml"'
- coverage html
- 'echo "Generated HTML report: ./htmlcov/index.html"'
docs:
desc: Start the local documentation server.
cmds:
- mkdocs serve -f ./mkdocs.yml
lint:
desc: Run the linting checks.
cmds:
- pre-commit run --all-files
format:
desc: Format the code (and imports).
cmds:
- python -m isort odmantic tests
- python -m black odmantic tests
setup:
desc: Configure the development environment.
cmds:
- task: setup:git-lfs
- task: setup:git-submodules
- task: setup:pre-commit-hook
- task: setup:deps-setup
setup:git-lfs:
cmds:
- git lfs install
- git lfs pull
status:
- test -d .git/lfs/
setup:git-submodules:
cmds:
- git submodule update --init
status:
- test -f .mongodb-cluster-action/README.md
setup:pre-commit-hook:
cmds:
- pre-commit install
status:
- test -f .git/hooks/pre-commit
setup:deps-setup:
deps:
- task: setup:flit
cmds:
- flit install --deps=all --python python
sources:
- pyproject.toml
setup:flit:
cmds:
- pip install flit
status:
- which flit
clean:
cmds:
- rm -rf dist/
- rm -rf htmlcov/ ./.coverage ./coverage.xml
- rm -rf .task/ ./__release_notes__.md ./__version__.txt