-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
111 lines (92 loc) Β· 2.39 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
version: '3'
silent: false
vars:
TOOL: "poetry run python -m tools.exec -t"
tasks:
gen:types:
desc: π§ββοΈ generate typed dict automatically
cmds:
- "{{.TOOL}} generator:types"
sources:
- pest/metadata/types/*.py
generates:
- pest/decorators/dicts/*.py
fmt:check:
aliases: [fmt]
desc: check code format issues
cmds:
- poetry run black --check .
fmt:fix:
desc: fix code format issues
cmds:
- poetry run black .
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
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
checks:
desc: π¨ run all checks
cmds:
- task --parallel fmt:check lint:check
coverage:
desc: π run coverage
cmds:
- poetry run pytest --cov
prebuild:
desc: β run pre-commit tasks
cmds:
# run all tests
- task checks
- task test:all
build:
desc: ποΈ build package
cmds:
- poetry build
local-ci-workflow-release:
desc: π run local ci workflow
cmds:
- |
act push \
-W="./.github/workflows/ci.yml" \
-e="./.github/act-test/release.json" \
--secret-file="./.github/act-test/secrets.env" \
--pull=false \
--matrix python-version:3.11
local-ci-workflow-pr:
desc: π run local ci workflow - pull request
cmds:
- |
act pull_request \
-W="./.github/workflows/ci.yml" \
--secret-file="./.github/act-test/secrets.env" \
--pull=false \
--matrix python-version:3.11