-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
109 lines (91 loc) · 2.48 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
version: '3'
silent: false
vars:
RUNTOOL: "poetry run python -m common.cli.exec_tool -t"
tasks:
fmt:check:
aliases: [fmt]
desc: 🎨 » check code format issues
cmds:
- poetry run ruff format --check .
fmt:fix:
desc: 🎨 » fix code format issues
cmds:
- poetry run ruff format .
lint:check:
aliases: [lint]
desc: 📏 » check code lint issues
cmds:
- poetry run ruff check .
lint:fix:
desc: 📏 » fix code lint issues
cmds:
- poetry run ruff check . --fix
checks:
desc: ✅ » run all checks
deps:
- fmt
- lint
- test
test:
desc: 🧪 » run tests
cmds:
- poetry run pytest tests
test:3.8:
desc: 🧪 run tests on python 3.8
cmds:
- nox --session tests-3.8 --reuse-existing-virtualenvs
test:3.9:
desc: 🧪 run tests on python 3.9
cmds:
- nox --session tests-3.9 --reuse-existing-virtualenvs
test:3.10:
desc: 🧪 run tests on python 3.10
cmds:
- nox --session tests-3.10 --reuse-existing-virtualenvs
test:3.11:
desc: 🧪 run tests on python 3.11
cmds:
- nox --session tests-3.11 --reuse-existing-virtualenvs
test:3.12:
desc: 🧪 run tests on python 3.12
cmds:
- nox --session tests-3.12 --reuse-existing-virtualenvs
test:all:
desc: 🧪 run tests on all python versions
cmds:
- task --parallel test:3.12 test:3.11 test:3.10 test:3.9 test:3.8
build:
desc: 🏗️ » build package
sources:
- common/**/*
- pyproject.toml
generates:
- dist/common-*.*.*.tar.gz
- dist/common-*.*.*-py3-none-any.whl
cmds:
- rm -rf dist
- poetry build
publish:
desc: 🚀 » publish package to gitea
aliases: [pub]
summary: |
This task will publish the package to gitea, bumping the version according to the bump
argument. The default bump is patch, and the bump parameter MUST be one of patch, minor or
major. Call examples:
- task publish
- task publish bump=patch
- task publish bump=minor
- task publish bump=major
deps:
- checks
- build
vars:
bump: '{{.bump | default "patch"}}'
version:
sh: poetry version {{.bump}} -s
cmds:
- git add .
- 'git commit -m "release: 🔖 v{{.version}}"'
- git push
- poetry publish