-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
102 lines (80 loc) · 2.06 KB
/
Taskfile.yml
File metadata and controls
102 lines (80 loc) · 2.06 KB
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
---
# https://taskfile.dev
version: '3'
#includes:
# docs:
# taskfile: ./docs/Taskfile.yml
# dir: ./docs
tasks:
list:
desc: "Show available commands"
aliases:
- default
silent: true
cmds:
- task --list-all
# Publish and release
# =============
publish_pypi_test:
desc: Publish package on test.pypi.org
cmds:
- poetry build
- poetry publish -r testpypi
publish_pypi:
desc: Publish package on pypi.org
cmds:
- poetry build
- poetry publish
# Fix
# =============
fix_lint:
desc: fix all what can be fixed
cmds:
- isort --profile black --overwrite-in-place $(git ls-files | grep '\.py$')
- black $(git ls-files | grep '\.py$')
#- pymarkdownlnt fix $( git ls-files | grep '\.md$' )
test_lint:
desc: show what can be improved
cmds:
- isort --profile black $(git ls-files | grep '\.py$')
- black --check $(git ls-files | grep '\.py$')
- pylint $(git ls-files | grep '\.py$')
test_lint_full:
desc: run all linting tests
cmds:
- task: test_lint
- yamllint $( git ls-files | grep '\.yml$' )
- pymarkdownlnt scan $( git ls-files | grep '\.md$' )
- shellcheck $( git ls-files | grep '\.sh$' )
# Tests
# =============
test:
desc: Test everything
cmds:
- task: test_pytest
# - task: test_regressions
# - task: test_report
# - task: test_lab
#- task: test_examples
- task: test_lint
test_pytest:
desc: Test with pytest
cmds:
- pytest --durations=10 --durations-min=1.0 --tb no -vv tests
test_lab:
dest: Test lab
cmds:
- bash ./scripts/run_python_scripts.sh lab 'test[0-9]*'
test_examples:
dest: Test examples
cmds:
- bash ./scripts/run_python_scripts.sh examples 'example[0-9]*'
test_regressions:
desc: Test for regressions
cmds:
- pytest tests/test_50_*
test_report:
desc: Report tests
cmds:
# - pytest tests --tb no -vv -q
- pytest --cov=superconf --cov-report term-missing tests/